示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string patientid = Session["uid"].ToString();

            patients = Patient_C.GetPatientinformation(patientid);
            if (patients[0].P_Sex == "男")
            {
                sex = "先生";
            }
            else
            {
                sex = "女士";
            }
            cases = Case_C.GetCaseinformation(patientid);
            string employeeid = cases[0].E_ID.ToString();

            employeedoctor  = Employee_C.SeekDep(employeeid);
            pcname.Value    = patients[0].P_Name;
            pcage.Value     = patients[0].P_Age.ToString();
            pcgender.Value  = patients[0].P_Sex;
            pcdoctor.Value  = employeedoctor.E_Name;
            Complain1.Value = cases[0].C_Complain;
            Diagnose1.Value = cases[0].C_Diagnose;
            Advice1.Value   = cases[0].C_Advice;
        }
示例#2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            em.Name = Request.Form["name"];
            System.Diagnostics.Debug.WriteLine(Request.Form["sex"]);
            em.Sex         = Request.Form["sex"];
            em.Phone       = Request.Form["phone"];
            em.Birth       = Convert.ToDateTime(Request.Form["birth"]);
            em.BankAccount = Request.Form["bankaccount"];
            em.Email       = Request.Form["email"];
            em.Position    = Convert.ToInt32(Request.Form["position"]);
            string pwd = Request.Form["password"];

            if (pwd != "")
            {
                em.PassWord = pwd;
            }
            bool up_result = Employee_C.AlterByID(em);

            if (up_result)
            {
                Response.Write("<script language=javascript>window.alert('修改成功!');window.location.href('/Views/PSInfo1/PSInfo1.aspx');</script>");
                //Response.Redirect("/Views/PSInfo/PSInfo.aspx");
            }
            else
            {
                Response.Write("<script language=javascript>window.alert('修改失败,请重新检查输入信息是否正确!');</script>");
            }
        }
示例#3
0
        protected void search_Click(object sender, EventArgs e)
        {
            Response.Write("<script languge='javascript'>alert('" + Patient_ID.Value + "');</script>");
            List <Patient> patients = Patient_C.GetPatientinformation(Patient_ID.Value);

            pname.Value      = patients[0].P_Name;
            patientage.Value = patients[0].P_Age.ToString();
            patientsex.Value = patients[0].P_Sex;
            pphone.Value     = patients[0].P_Phone;
            List <Case>     cases     = Case_C.GetCaseinformation(Patient_ID.Value);
            List <Employee> employees = Employee_C.Select(cases[0].E_ID.ToString());
            Department      depart    = Department_C.DE_seekname(employees[0].DE_ID.ToString());

            pdoctor.Value = employees[0].E_Name;
            pdepart.Value = depart.DE_Name;
            List <Sickbed> sb_list = Sickbed_C.SickBedInfobyde(depart.DE_ID.ToString());
            int            i       = 0;

            foreach (Sickbed sb in sb_list)
            {
                Patient patient = Patient_C.GetpInfo_bybed(sb.S_ID.ToString());
                if (patient == null)
                {
                    patient        = new Patient();
                    patient.P_Name = "*";
                }
                string dename = Department_C.DE_seekname(sb.DE_ID.ToString()).DE_Name;
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript" + i, "<script type='text/javascript'>AddTable('" + sb.R_ID + "','" + dename + "','" + sb.S_ID + "','" + patient.P_Name + "','" + sb.S_Bool + "');</script>");
                i++;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            String eid = Request.QueryString["id"];

            employees     = Employee_C.SelectFuzzy(eid);
            id.Value      = employees[0].ID;
            up_name.Value = employees[0].Name;
            if (employees[0].Sex == "男")
            {
                this.sex.SelectedIndex = 0;
            }
            else
            {
                this.sex.SelectedIndex = 1;
            }
            births.Text    = employees[0].Birth.ToString("yyyy-MM-dd");
            passwords.Text = employees[0].PassWord;
            email.Value    = employees[0].Email;
            phone.Value    = employees[0].Phone;

            if (employees[0].Position == 1)
            {
                position.Value = "管理员";
            }
            else if (employees[0].Position == 2)
            {
                position.Value = "仓库管理员";
            }
            if (employees[0].Position == 3)
            {
                position.Value = "销售员";
            }
            bankaccount.Value = employees[0].BankAccount;
        }
示例#5
0
        protected void department_SelectedIndexChanged(object sender, EventArgs e)
        {
            doctor.Items.Clear();
            List <Employee> employees2 = Employee_C.SelectEmployee(department.Text);

            this.doctor.DataSource    = employees2;
            this.doctor.DataTextField = "E_Name";
            this.doctor.DataBind();
        }
示例#6
0
 protected void search_Click(object sender, EventArgs e)
 {
     if (eidtext.Value == "")
     {
         employees = Employee_C.SelectFuzzy(enametext.Value);
     }
     else
     {
         employees = Employee_C.Select(eidtext.Value);
     }
 }
示例#7
0
 protected void delete_Click(object sender, EventArgs e)
 {
     if (Employee_C.DeleteByID(E_ID.Value) == true)
     {
         Response.Write("<script language=javascript>window.alert('删除成功!');</script>");
     }
     else
     {
         Response.Write("<script language=javascript>window.alert('删除失败!');</script>");
     }
 }
示例#8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string eid = Request.QueryString["E_ID"];

            if (eid != "")
            {
                List <Employee> employees = Employee_C.Select(eid);
                E_ID.Value       = employees[0].E_ID.ToString();
                E_Name.Value     = employees[0].E_Name;
                E_Sex.Value      = employees[0].E_Sex;
                E_Age.Value      = employees[0].E_Age.ToString();
                DE_ID.Value      = employees[0].DE_ID.ToString();
                E_position.Value = employees[0].E_Position;
                E_phone.Value    = employees[0].E_Phone;
            }
        }
示例#9
0
 protected void insert_Click(object sender, EventArgs e)
 {
     if (Employee_C.Exist(Convert.ToInt32(E_ID.Value)) == true)
     {
         Response.Write("<script language=javascript>window.alert('该员工已存在!');</script>");
     }
     else
     {
         if (Employee_C.Insert(Convert.ToInt32(E_ID.Value), E_Name.Value, E_Sex.Value, Convert.ToInt32(E_Age.Value), Convert.ToInt32(DE_ID.Value), E_position.Value, E_phone.Value) == true && User_C.Inserteid(E_ID.Value, E_position.Value) == true)
         {
             Response.Write("<script language=javascript>window.alert('插入成功!');</script>");
         }
         else
         {
             Response.Write("<script language=javascript>window.alert('插入失败!');</script>");
         }
     }
 }
        protected void Update_Click(object sender, EventArgs e)
        {
            employees[0].Name        = Request.Form["up_name"];
            employees[0].Sex         = Request.Form["sex"];
            employees[0].Phone       = Request.Form["phone"];
            employees[0].Birth       = Convert.ToDateTime(Request.Form["births"]);
            employees[0].BankAccount = Request.Form["bankaccount"];
            employees[0].Email       = Request.Form["email"];
            bool up_result = Employee_C.AlterByID(employees[0]);

            if (up_result)
            {
                Response.Write("<script language=javascript>window.alert('修改成功!');</script>");
                Response.Redirect("/Views/EmployeeManager/EmployeeManager.aspx");
            }
            else
            {
                Response.Write("<script language=javascript>window.alert('修改失败,请重新检查输入信息是否正确!');</script>");
            }
        }
 protected void Delete_Click(object sender, EventArgs e)
 {
     content = search_content.Value.ToString();
     if (content.Length != 8)
     {
         Response.Write("<script language=javascript>window.alert('请输入完整工号!');</script>");
     }
     else
     {
         Boolean del_result = Employee_C.DeleteByID(content);
         if (del_result)
         {
             Response.Write("<script language=javascript>window.alert('删除成功!');</script>");
             employees = Employee_C.SelectFuzzy("");
         }
         else
         {
             Response.Write("<script language=javascript>window.alert('删除失败!');</script>");
         }
     }
 }
        protected void Add_Click(object sender, EventArgs e)
        {
            String sex = null;
            int    pos = 0;

            if (sex_male.Checked)
            {
                sex = "男";
            }
            else if (sex_female.Checked)
            {
                sex = "女";
            }
            if (position.Value.ToString() == "管理员")
            {
                pos = 1;
            }
            else if (position.Value.ToString() == "仓库管理员")
            {
                pos = 2;
            }
            if (position.Value.ToString() == "销售员")
            {
                pos = 1;
            }

            Employee employee = Employee_C.AddEmployee(name.Value.ToString(), sex, phone.Value.ToString(), birth.Value.ToString()
                                                       , pos, bankaccount.Value.ToString(), email.Value.ToString());

            if (employee == null)
            {
                Response.Write("<script language=javascript>window.alert('添加失败,请重新检查输入信息是否正确!');</script>");
            }
            else
            {
                Response.Write("<script language=javascript>window.alert('插入成功!');</script>");
                Response.Redirect("/Views/EmployeeManager/EmployeeManager.aspx");
            }
        }
示例#13
0
        protected void cashbutton_Click(object sender, EventArgs e)
        {
            bool result = Patient_C.Insert(pname.Value, psex.Value, ppage.Value, pphone.Value);

            if (result)
            {
                string          patientid  = Patient_C.GetPatientid(pname.Value);
                List <Employee> employees  = Employee_C.SelectFuzzy(doctor.SelectedValue);
                int             doctorid   = employees[0].E_ID;
                bool            resultcase = Case_C.Insert(Convert.ToInt32(patientid), doctorid, null, null, null, null);
                Response.Write("<script language=javascript>window.alert('挂号成功,您的编号为:" + patientid + "');</script>");
                bool resultuser = User_C.Insertpid(patientid);
                pname.Value  = null;
                psex.Value   = "男";
                ppage.Value  = null;
                pphone.Value = null;
            }
            else
            {
                Response.Write("<script language=javascript>window.alert('挂号失败!');</script>");
            }
        }
示例#14
0
        protected void update_Click(object sender, EventArgs e)
        {
            if (Employee_C.Update(Convert.ToInt32(E_ID.Value), Request.Form["E_Name"], Request.Form["E_Sex"], Convert.ToInt32(Request.Form["E_Age"]), Convert.ToInt32(Request.Form["DE_ID"]), Request.Form["E_position"], Request.Form["E_phone"]) == true)
            {
                Response.Write("<script language=javascript>window.alert('更新成功!');</script>");
            }
            else
            {
                Response.Write("<script language=javascript>window.alert('更新失败!');</script>");
            }
            string eid = Request.QueryString["E_ID"];

            if (eid != "")
            {
                List <Employee> employees = Employee_C.Select(eid);
                E_ID.Value       = employees[0].E_ID.ToString();
                E_Name.Value     = employees[0].E_Name;
                E_Sex.Value      = employees[0].E_Sex;
                E_Age.Value      = employees[0].E_Age.ToString();
                DE_ID.Value      = employees[0].DE_ID.ToString();
                E_position.Value = employees[0].E_Position;
                E_phone.Value    = employees[0].E_Phone;
            }
        }
示例#15
0
 //员工只具有修改个人信息的权利
 public static bool alterById(Employee employee)
 {
     return(Employee_C.AlterByID(employee));
 }
 protected void Search_Click(object sender, EventArgs e)
 {
     content   = search_content.Value.ToString();
     employees = Employee_C.SelectFuzzy(content);
 }
示例#17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     employees = Employee_C.SelectFuzzy("");
 }