index.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
namespace 淮安协和门诊
{
public partial class index : System.Web.UI.Page
{
SQLHelper db = new SQLHelper();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string sql = "select * from depart";
DataTable dt = db.ExecuteQuery(sql, CommandType.Text);
this.ddl_depart.DataSource = dt;
this.ddl_depart.DataTextField = "depart";
this.ddl_depart.DataValueField = "depart_id";
this.ddl_depart.DataBind();
//
}
}
protected void Button1_Click(object sender, EventArgs e)
{
int depart_id=int.Parse(this.ddl_depart.SelectedValue.ToString());
string user = this.txt_zh.Text.ToString();
string password = this.txt_mima.Text.ToString();
string sql = "select * from yg where zh='" + user + "' and mima='" + password + "' and depart_id='"+depart_id+"'";
DataTable dt = db.ExecuteQuery(sql, CommandType.Text);
int count = dt.Rows.Count;
if (count == 0)
{
Response.Write("<script>alert('请填写正确的账号和密码!');location='index.aspx'</script>");
}
else
{
Session["zh"] = user;
Session["depart"]=this.ddl_depart.SelectedItem.ToString();
Session["name"] = dt.Rows[0]["name"].ToString();
Session["yg_type"] = dt.Rows[0]["yg_type"].ToString();
if (dt.Rows[0]["yg_type"].ToString() == "预约员")//假如是预约员,就导向到预约平台
{
Response.Redirect("dy_index.aspx");
}
if (dt.Rows[0]["yg_type"].ToString() == "医生")//假如是医生,就导向到医生平台
{
Response.Redirect("doctor_index.aspx");
}
if (dt.Rows[0]["yg_type"].ToString() == "药房管理")//假如是医生,就导向到医生平台
{
Response.Redirect("yf_index.aspx");
}
if (dt.Rows[0]["yg_type"].ToString() == "收费员")//假如是医生,就导向到医生平台
{
Response.Redirect("sf_index.aspx");
后面还有 7 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。