Esempio n. 1
0
    protected void user_department_SelectedIndexChanged(object sender, EventArgs e)
    {
        this.id = this.user_department.SelectedValue;
        this.user_department.DataSource     = DatabaseTool.ExecSqlReturnTable("select * from department where d_number= " + id);
        this.user_department.DataTextField  = "d_name";
        this.user_department.DataValueField = "d_number";

        user_department.DataBind();
    }
    protected void NativeProvinceList_SelectedIndexChanged(object sender, EventArgs e)
    {
        // Response.Write("<script>alert('我响应了!')</script>");
        String proID = this.NativeProvinceList.SelectedValue;

        this.NativeCityList.DataSource     = DatabaseTool.ExecSqlReturnTable("select * from city where province_num= " + proID);
        this.NativeCityList.DataTextField  = "city_name";
        this.NativeCityList.DataValueField = "number";
        NativeCityList.DataBind();
    }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["number"] == null)
        {
            Response.Write("<script language=javascript>window.alert('请先登录!');window.location.href=('login.aspx');</script>");
        }
        session.Text = Session["number"].ToString();
        DataTable dt = DatabaseTool.ExecSqlReturnTable("select * from device");

        examination_num1.DataSource     = dt;
        examination_num1.DataTextField  = "d_num";
        examination_num1.DataValueField = "d_num";


        examination_num1.DataBind();
        examination_num2.DataSource    = dt;
        examination_num2.DataTextField = "d_num";
        examination_num2.DataBind();
        examination_num3.DataSource    = dt;
        examination_num3.DataTextField = "d_num";
        examination_num3.DataBind();
        examination_num4.DataSource    = dt;
        examination_num4.DataTextField = "d_num";
        examination_num4.DataBind();
        examination_num5.DataSource    = dt;
        examination_num5.DataTextField = "d_num";
        examination_num5.DataBind();
        examination_num6.DataSource    = dt;
        examination_num6.DataTextField = "d_num";
        examination_num6.DataBind();
        examination_num7.DataSource    = dt;
        examination_num7.DataTextField = "d_num";
        examination_num7.DataBind();
        examination_num8.DataSource    = dt;
        examination_num8.DataTextField = "d_num";
        examination_num8.DataBind();
        examination_num9.DataSource    = dt;
        examination_num9.DataTextField = "d_num";
        examination_num9.DataBind();
        examination_num10.DataSource    = dt;
        examination_num10.DataTextField = "d_num";
        examination_num10.DataBind();
        //不可编辑的医生编号从session中获取,即当前用户的编号
        doctor1.Text  = Session["doctorNum"].ToString();
        doctor2.Text  = Session["doctorNum"].ToString();
        doctor3.Text  = Session["doctorNum"].ToString();
        doctor4.Text  = Session["doctorNum"].ToString();
        doctor5.Text  = Session["doctorNum"].ToString();
        doctor6.Text  = Session["doctorNum"].ToString();
        doctor7.Text  = Session["doctorNum"].ToString();
        doctor8.Text  = Session["doctorNum"].ToString();
        doctor9.Text  = Session["doctorNum"].ToString();
        doctor10.Text = Session["doctorNum"].ToString();
    }
Esempio n. 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["number"] == null)
        {
            Response.Write("<script language=javascript>window.alert('请先登录!');window.location.href=('login.aspx');</script>");
        }
        System.Diagnostics.Debug.Write(Session["number"]);
        session.Text = Session["number"].ToString();
        DataTable dt = DatabaseTool.ExecSqlReturnTable("select * from department");

        room_department.DataSource    = dt;
        room_department.DataTextField = "d_name";
        room_department.DataBind();
    }
Esempio n. 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["number"] == null)
     {
         Response.Write("<script language=javascript>window.alert('请先登录!');window.location.href=('login.aspx');</script>");
     }
     session.Text = Session["number"].ToString();
     if (!IsPostBack)
     {
         DataTable dt = DatabaseTool.ExecSqlReturnTable("select * from department");
         user_department.DataSource     = dt;
         user_department.DataTextField  = "d_name";
         user_department.DataValueField = "d_number";
         user_department.DataBind();
     }
 }
Esempio n. 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["number"] == null)
        {
            Response.Write("<script language=javascript>window.alert('请先登录!');window.location.href=('login.aspx');</script>");
        }
        session.Text     = Session["number"].ToString();
        doctor_num.Text  = Session["doctorNum"].ToString();
        doctor_name.Text = Session["number"].ToString();
        DataTable dt = DatabaseTool.ExecSqlReturnTable("select * from patient where attending_physican_num=" + Session["doctorNum"].ToString());

        patient_num.DataSource     = dt;
        patient_num.DataTextField  = "p_name";
        patient_num.DataValueField = "p_number";
        patient_num.DataBind();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["number"] == null)
        {
            Response.Write("<script language=javascript>window.alert('请先登录!');window.location.href=('login.aspx');</script>");
        }
        session.Text = Session["number"].ToString();
        //为籍贯和出生地的省下拉框绑定数据源
        if (!IsPostBack)
        {
            DataTable dt = DatabaseTool.ExecSqlReturnTable("select * from province");
            NativeProvinceList.DataSource     = dt;
            NativeProvinceList.DataTextField  = "provinceName";
            NativeProvinceList.DataValueField = "provinceNum";
            NativeProvinceList.DataBind();
            BirthProvince.DataSource     = dt;
            BirthProvince.DataTextField  = "provinceName";
            BirthProvince.DataValueField = "provinceNum";
            BirthProvince.DataBind();

            //为籍贯和出生地的城市的下拉框绑定数据源
            dt = DatabaseTool.ExecSqlReturnTable("select * from city");
            NativeCityList.DataSource     = dt;
            NativeCityList.DataTextField  = "city_name";
            NativeCityList.DataValueField = "city_num";
            NativeCityList.DataBind();
            BirthCity.DataSource     = dt;
            BirthCity.DataTextField  = "city_name";
            BirthCity.DataValueField = "city_num";
            BirthCity.DataBind();

            //为这五个下拉框添加item0
            BirthCity.Items.Insert(0, "请选择市");
            NativeProvinceList.Items.Insert(0, "请选择省或直辖市");
            department.Items.Insert(0, "请选择科室");
            BirthProvince.Items.Insert(0, "请选择省或直辖市");
            NativeCityList.Items.Insert(0, "请选择市");

            //为科室下拉框绑定数据源
            dt = DatabaseTool.ExecSqlReturnTable("select * from department");
            department.DataSource    = dt;
            department.DataTextField = "d_name";
            department.DataBind();

            //为主治医师编号下拉框绑定数据源
            dt = DatabaseTool.ExecSqlReturnTable("select * from users where type=3");
            physician.DataSource    = dt;
            physician.DataTextField = "u_num";
            physician.DataBind();

            //为病房添加下拉框绑定数据源
            dt = DatabaseTool.ExecSqlReturnTable("select * from room");
            roomNumber.DataSource    = dt;
            roomNumber.DataTextField = "r_num";
            roomNumber.DataBind();

            //为病床添加下拉框绑定数据源,必须是可用的病床
            dt = DatabaseTool.ExecSqlReturnTable("select * from bed where isavailable=1");
            bedNumber.DataSource    = dt;
            bedNumber.DataTextField = "b_num";
            bedNumber.DataBind();
        }
    }