• 大小: 290KB
    文件类型: .rar
    金币: 2
    下载: 2 次
    发布日期: 2022-10-04
  • 语言: C#
  • 标签: C#  

资源简介

ASPNET学生选课系统C#代码ASPNET学生选课系统C#代码ASPNET学生选课系统C#代码

资源截图

代码片段和文件信息

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Login : System.Web.UI.Page
{
    protected void Page_Load(object sender EventArgs e)
    {
        
    }
    protected void ImageButton1_Click(object sender ImageClickEventArgs e)
    {
        string id = txtUid.Text.Trim();
        string pwd = CommonFunction.Encryption(txtPassword.Text.Trim());
        int _reslut = -2;
       
     //判断登录的类型:
        //管理员
        if (rbtnAdmin.Checked == true)
        {
            string  flag = LoginType.Administrators.ToString();
            _reslut = CommonFunction.Login(flag id pwd);
            if (_reslut == 1)
            {
                Session[“admin“] = “admin“;
                Session[“adid“] = id;
                Response.Redirect(“adminFSet.htm“);
            }
            else
            {
                ClientscriptManager csm = Page.Clientscript;
                Type tp = this.GetType();
                csm.RegisterStartupscript(tp “K1“ “ript>alert(‘用户名或密码输入错误‘)ript>“);
            }

            return;
        }

        //学生:
        if (rbtnStudent.Checked == true)
        {
            string  flag = LoginType.Student.ToString();
            _reslut = CommonFunction.Login(flag id pwd);

            if (_reslut == 1)
            {
                Session[“student“] = “student“;
                Session[“stuid“] = id;
                Response.Redirect(“studentFSet.htm“);
            }
            else
            {
                ClientscriptManager csm = Page.Clientscript;
                Type tp = this.GetType();
                csm.RegisterStartupscript(tp “K1“ “ript>alert(‘用户名或密码输入错误‘)ript>“);
            }

            return;
        }

        //教师
        if (rbtnTeacher.Checked == true)
        {
            string flag = LoginType.Teacher.ToString();

            _reslut = CommonFunction.Login(flag id pwd);
            if (_reslut == 1)
            {
                Session[“teacher“] = “teacher“;
                Session[“teid“] = id;
                Response.Redirect(“teacherFSet.htm“);
            }
            else
            {
                ClientscriptManager csm = Page.Clientscript;
                Type tp = this.GetType();
                csm.RegisterStartupscript(tp “K1“ “ript>alert(‘用户名或密码输入错误‘)ript>“);
            }

            return;
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        513  2009-05-20 09:05  ASPNET学生选课系统C#代码\adminFSet.htm

     文件       3829  2009-05-20 16:23  ASPNET学生选课系统C#代码\AdminPage\AdminTop.aspx

     文件        767  2009-06-01 13:10  ASPNET学生选课系统C#代码\AdminPage\AdminTop.aspx.cs

     文件       2582  2009-05-24 13:03  ASPNET学生选课系统C#代码\AdminPage\admin_AddChPassword.aspx

     文件       1411  2009-06-01 13:13  ASPNET学生选课系统C#代码\AdminPage\admin_AddChPassword.aspx.cs

     文件       5199  2009-06-01 14:46  ASPNET学生选课系统C#代码\AdminPage\admin_AddCourseInfo.aspx

     文件       1517  2009-06-01 13:14  ASPNET学生选课系统C#代码\AdminPage\admin_AddCourseInfo.aspx.cs

     文件       5079  2009-06-01 14:47  ASPNET学生选课系统C#代码\AdminPage\admin_AddDepInfo.aspx

     文件       1334  2009-06-01 13:15  ASPNET学生选课系统C#代码\AdminPage\admin_AddDepInfo.aspx.cs

     文件       2781  2009-05-25 10:51  ASPNET学生选课系统C#代码\AdminPage\admin_AddStudentInfo.aspx

     文件       2415  2009-06-01 13:19  ASPNET学生选课系统C#代码\AdminPage\admin_AddStudentInfo.aspx.cs

     文件       7834  2009-05-25 14:51  ASPNET学生选课系统C#代码\AdminPage\admin_AddTeachCourse.aspx

     文件       4468  2009-06-01 13:19  ASPNET学生选课系统C#代码\AdminPage\admin_AddTeachCourse.aspx.cs

     文件       6554  2009-06-01 14:44  ASPNET学生选课系统C#代码\AdminPage\admin_AddTeacherInfo.aspx

     文件       4683  2009-06-01 13:21  ASPNET学生选课系统C#代码\AdminPage\admin_AddTeacherInfo.aspx.cs

     文件       4402  2009-05-23 11:10  ASPNET学生选课系统C#代码\AdminPage\admin_PersonInfo.aspx

     文件       2460  2009-06-01 22:34  ASPNET学生选课系统C#代码\AdminPage\admin_PersonInfo.aspx.cs

     文件        551  2009-05-21 20:17  ASPNET学生选课系统C#代码\AdminPage\admin_SomeSearch.aspx

     文件        599  2009-06-01 13:31  ASPNET学生选课系统C#代码\AdminPage\admin_SomeSearch.aspx.cs

     目录          0  2011-06-03 20:09  ASPNET学生选课系统C#代码\AdminPage

     文件      20167  2009-06-02 14:12  ASPNET学生选课系统C#代码\App_Code\CommonFunction.cs

     文件       4474  2009-05-28 21:47  ASPNET学生选课系统C#代码\App_Code\DoExcel.cs

     文件       9271  2009-06-01 10:01  ASPNET学生选课系统C#代码\App_Code\GetDateFromDb.cs

     文件       7466  2009-06-01 09:00  ASPNET学生选课系统C#代码\App_Code\SaveDateToDb.cs

     目录          0  2011-06-03 20:09  ASPNET学生选课系统C#代码\App_Code

     目录          0  2011-06-03 20:09  ASPNET学生选课系统C#代码\App_Data

     文件       6774  2009-05-13 09:06  ASPNET学生选课系统C#代码\Image\AdminImage\addCourseInfo.bmp

     文件       1163  2009-05-13 20:40  ASPNET学生选课系统C#代码\Image\AdminImage\AddDepAlone.png

     文件       6774  2009-05-13 09:16  ASPNET学生选课系统C#代码\Image\AdminImage\addDepartmentInfo.bmp

     文件       1239  2009-05-13 20:40  ASPNET学生选课系统C#代码\Image\AdminImage\AddDepMult.png

............此处省略98个文件信息

评论

共有 条评论