protected void search_Click(object sender, EventArgs e) { if (pidtext.Value != "") { List <Case> c_list = Case_C.GetCaseinformation(pidtext.Value); if (c_list != null) { int i = 0; foreach (Case ca in c_list) { Patient p = Patient_C.GetSingle_pInfo(ca.P_ID.ToString()); ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript" + i, "<script type='text/javascript'>AddTable('" + p.P_Name + "','" + p.P_Sex + "','" + p.P_Age + "','" + ca.C_Diagnose + "','" + ca.C_Advice + "');</script>"); i++; } } } else { List <Case> c_list = Case_C.GetAll_Info(); if (c_list != null) { int i = 0; foreach (Case ca in c_list) { Patient p = Patient_C.GetSingle_pInfo(ca.P_ID.ToString()); ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript" + i, "<script type='text/javascript'>AddTable('" + p.P_ID + "','" + p.P_Name + "','" + p.P_Sex + "','" + p.P_Age + "','" + ca.C_Diagnose + "','" + ca.C_Advice + "');</script>"); i++; } } } }
protected void add_drug_Click(object sender, EventArgs e) { int i = 0; String s = patient_ID.Value.ToString(); if (int.TryParse(s, out i) == false) { Response.Write("<script language=javascript>window.alert('病人ID输入格式不正确!');</script>"); } else { if (Patient_C.isExit(s) == false) { Response.Write("<script language=javascript>window.alert('该病人ID不存在!');</script>"); } else { patient1 = Patient_C.GetPatientinformation(s); name1.Value = " 姓名:" + patient1[0].P_Name + ""; sex1.Value = " 性别:" + patient1[0].P_Sex + ""; age1.Value = " 年龄:" + Convert.ToString(patient1[0].P_Age) + ""; phone1.Value = " 手机号:" + Convert.ToString(patient1[0].P_Phone) + ""; prescript = new Prescript(); if (int.TryParse(drug_ID.Value, out i) == false) { Response.Write("<script language=javascript>window.alert('药品ID输入格式不正确!');</script>"); } else { if (Drug_C.ExistDrug(Convert.ToInt32(drug_ID.Value)) == false) { Response.Write("<script language=javascript>window.alert('该药品ID不存在!');</script>"); } else { prescript.D_ID = Convert.ToInt32(drug_ID.Value); prescript.C_ID = Convert.ToInt32(Case_C.GetCaseID(Convert.ToInt32(patient_ID.Value))); prescript.D_Name = Drug_C.GetDrugname(Convert.ToInt32(drug_ID.Value)); if (int.TryParse(drug_number.Value, out i) == false) { Response.Write("<script language=javascript>window.alert('药品数量输入格式不正确!');</script>"); } else { prescript.D_Number = Convert.ToInt32(drug_number.Value); prescript.D_Totalprice = (float)Convert.ToDouble(((Drug_C.GetSellingPrice(Convert.ToInt32(drug_ID.Value))) * (Convert.ToInt32(drug_number.Value)))); prescript.P_Notes = drug_note.Value; prescripts.Add(prescript); drug_ID.Value = ""; drug_name.Value = ""; drug_number.Value = ""; drug_note.Value = ""; Text_ID.Value = ""; Text_Name.Value = ""; } } } } } }
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 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; }
protected void Button_add_text_Click(object sender, EventArgs e) { int i = 0; String s = patient_ID.Value.ToString(); if (int.TryParse(s, out i) == false) { Response.Write("<script language=javascript>window.alert('病人ID输入格式不正确!');</script>"); } else { if (Patient_C.isExit(s) == false) { Response.Write("<script language=javascript>window.alert('该病人ID不存在!');</script>"); } else { patient1 = Patient_C.GetPatientinformation(s); name1.Value = " 姓名:" + patient1[0].P_Name + ""; sex1.Value = " 性别:" + patient1[0].P_Sex + ""; age1.Value = " 年龄:" + Convert.ToString(patient1[0].P_Age) + ""; phone1.Value = " 手机号:" + Convert.ToString(patient1[0].P_Phone) + ""; if (int.TryParse(Text_ID.Value, out i) == false) { Response.Write("<script language=javascript>window.alert('检查项ID输入格式不正确!');</script>"); } else { test = new Test(); if (AssessmentItem_C.ExistText(Convert.ToInt32(Text_ID.Value)) == false) { Response.Write("<script language=javascript>window.alert('检查项ID不存在!');</script>"); } else { test.IT_ID = Convert.ToInt32(Text_ID.Value); test.C_ID = Convert.ToInt32(Case_C.GetCaseID(Convert.ToInt32(patient_ID.Value))); test.IT_Name = AssessmentItem_C.GetTextname(Convert.ToInt32(Text_ID.Value)); test.IT_Price = AssessmentItem_C.GetPrice(Convert.ToInt32(Text_ID.Value)); tests.Add(test); drug_ID.Value = ""; drug_name.Value = ""; drug_number.Value = ""; drug_note.Value = ""; Text_ID.Value = ""; Text_Name.Value = ""; } } } } }
protected void Page_Load(object sender, EventArgs e) { int patientid = Convert.ToInt32(Session["uid"]); patients = Patient_C.GetPatientinformation(patientid.ToString()); if (patients[0].P_Sex == "男") { sex = "先生"; } else { sex = "女士"; } testsum = 0; prescriptsum = 0; hsum = 0; tests = Test_C.SelectTest(patientid); prescripts = Prescript_C.SelectPrescript(patientid); bool result = Hospitalization_C.AlterHospitalization(patientid); hospitalizations = Hospitalization_C.SelectHospitalization(patientid); if (prescripts != null) { for (int i = 0; i < prescripts.Count; i++) { sellingprice[i] = Drug_C.GetSellingPrice(prescripts[i].D_ID); prescriptsum += prescripts[i].D_Totalprice; } } if (tests != null) { for (int i = 0; i < tests.Count; i++) { testsum += tests[i].IT_Price; } } if (hospitalizations != null) { for (int i = 0; i < hospitalizations.Count; i++) { hsum += hospitalizations[i].H_Sum; } } sum1.Text = prescriptsum.ToString() + '元'; sum2.Text = testsum.ToString() + '元'; sum3.Text = hsum.ToString() + '元'; sum.Text = (prescriptsum + testsum + hsum).ToString() + '元'; }
protected void Page_Load(object sender, EventArgs e) { //加载医嘱信息 if (!Page.IsPostBack) { List <Case> c_list = Case_C.GetAll_Info(); if (c_list != null) { int i = 0; foreach (Case ca in c_list) { Patient p = Patient_C.GetSingle_pInfo(ca.P_ID.ToString()); ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript" + i, "<script type='text/javascript'>AddTable('" + p.P_ID + "','" + p.P_Name + "','" + p.P_Sex + "','" + p.P_Age + "','" + ca.C_Diagnose + "','" + ca.C_Advice + "');</script>"); i++; } } } }
protected void Page_Load(object sender, EventArgs e) { string patientid = null; patientid = Session["uid"].ToString(); if (patientid != null) { patients = Patient_C.GetPatientinformation(patientid); if (patients[0].P_Sex == "男") { sex = "先生"; } else { sex = "女士"; } } }
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>"); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //加载病床信息 List <Sickbed> sb_list = Sickbed_C.SickBed_Info(); int i = 0; foreach (Sickbed sb in sb_list) { //Response.Write("<script languge='javascript'>alert('病床信息');</script>"); 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 Button2_Click1(object sender, EventArgs e) { int i = 0; String Doctorid; String s = patient_ID.Value.ToString(); if (int.TryParse(s, out i) == false) { Response.Write("<script language=javascript>window.alert('病人ID输入格式不正确!');</script>"); } else { Doctorid = Session["uid"].ToString(); if (Patient_C.isExit(s) == false) { Response.Write("<script language=javascript>window.alert('该病人ID不存在!');</script>"); } else { if (Case_C.register(s, Doctorid) == false) { Response.Write("<script language=javascript>window.alert('该病人挂号不成功!');</script>"); } else { patient1 = Patient_C.GetPatientinformation(s); name1.Value = " 姓名:" + patient1[0].P_Name + ""; sex1.Value = " 性别:" + patient1[0].P_Sex + ""; age1.Value = " 年龄:" + Convert.ToString(patient1[0].P_Age) + ""; phone1.Value = " 手机号:" + Convert.ToString(patient1[0].P_Phone) + ""; name1.Visible = true; sex1.Visible = true; age1.Visible = true; phone1.Visible = true; } } } }
protected void search_drug_Click(object sender, EventArgs e) { int i = 0; String s = patient_ID.Value.ToString(); if (int.TryParse(s, out i) == false) { Response.Write("<script language=javascript>window.alert('病人ID输入格式不正确!');</script>"); } else { if (Patient_C.isExit(s) == false) { Response.Write("<script language=javascript>window.alert('该病人ID不存在!');</script>"); } else { patient1 = Patient_C.GetPatientinformation(s); if (Drug_C.isExit(drug_name.Value) == false) { Response.Write("<script language=javascript>window.alert('该药品不存在!');</script>"); } else { drugs = Drug_C.SelectFuzzy(drug_name.Value); drug_name.Value = ""; name1.Value = " 姓名:" + patient1[0].P_Name + ""; sex1.Value = " 性别:" + patient1[0].P_Sex + ""; age1.Value = " 年龄:" + Convert.ToString(patient1[0].P_Age) + ""; phone1.Value = " 手机号:" + Convert.ToString(patient1[0].P_Phone) + ""; name1.Visible = true; sex1.Visible = true; age1.Visible = true; phone1.Visible = true; } } } }