⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 default.aspx.cs

📁 医院的用户管理与缴费与当病人去医院看病的时候要挂号等作用。
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
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 _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click1(object sender, EventArgs e)
    {



        admin ck = new admin();
        person ckp = new person();
        if (ck.Chkadmin(TextBox1.Text, TextBox2.Text, Page))
        {
            DataTable info = ck.ReInfo(TextBox1.Text, TextBox2.Text, Page);
            string id = info.Rows[0]["adminid"].ToString();
            string name = info.Rows[0]["adminname"].ToString();
            string psw = info.Rows[0]["adminpwd"].ToString();
            string type = info.Rows[0]["type"].ToString();
            Session["id"] = id;
            Session["name"] = name;
            Session["psw"] = psw;
            Session["type"] = type;
            if (Session["type"].ToString() == "部门管理员")
            {
                Response.Redirect("BusinessSys/depedit.aspx");
            }
            else if (Session["type"].ToString() == "药检管理员")
            {
                Response.Redirect("OrganizationSys/Default.aspx");
            }
            else if (Session["type"].ToString() == "系统管理员")
            {
                Response.Redirect("Management/addadmin.aspx");
            }
            else if (Session["type"].ToString() == "医院管理员")
            {
                Response.Redirect("ConsumptionSys/hospital.aspx");
            }
            else if (Session["type"].ToString() == "药店管理员")
            {
                Response.Redirect("ConsumptionSys/drugstore.aspx");
            }

        }
        else if (ckp.ck(TextBox1.Text, TextBox2.Text, Page).Rows.Count != 0)
        {
            DataTable person = ckp.ck(TextBox1.Text, TextBox2.Text, Page);
            string perid = person.Rows[0]["personid"].ToString();
            string perpsw = person.Rows[0]["perpsw"].ToString();
            string pername = person.Rows[0]["personname"].ToString();
            string depid = person.Rows[0]["departmentid"].ToString();
            string persex = person.Rows[0]["personsex"].ToString();
            Session["perid"] = perid;
            Session["perpsw"] = perpsw;
            Session["pername"] = pername;
            Session["perdepid"] = depid;
            Session["persex"] = persex;
            
            Response.Redirect("InquireSys/Default.aspx");

        }
        else
        {
            Response.Write("<script language=javascript>alert('用户名或密码错!')</script>");
        }

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -