/// <summary> /// 打开患者的病历概述和已写病历 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnRecord_Click(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; btnRecord.Enabled = false; Form frm = new Form(); frm.WindowState = FormWindowState.Maximized; ucDoctorOperater ucOperater = new ucDoctorOperater(DataInit.CurrentPatient); //ucOperater.c1OutPage2.PageVisible = false; //ucOperater.c1OutPage4.PageVisible = false; //ucOperater.c1OutPage5.PageVisible = false; //ucOperater.c1OutPage3.PageVisible = true; frm.Controls.Add(ucOperater); ucOperater.Dock = DockStyle.Fill; frm.ShowDialog(); } catch { } finally { this.Cursor = Cursors.Default; btnRecord.Enabled = true; } }
private void fg_DoubleClick(object sender, EventArgs e) { try { //获取病人ID string id = ucGridviewX1.fg.SelectedRows[0].Cells[0].Value.ToString(); string sql = "select * from t_in_patient t where t.id='" + id + "'"; DataSet ds = App.GetDataSet(sql); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { InPatientInfo patientInfo = new InPatientInfo(); patientInfo = DataInit.InitPatient(ds.Tables[0].Rows[0]); ucDoctorOperater fq = new ucDoctorOperater(patientInfo); //frmMain fq = new frmMain(patientInfo, true, patientInfo.Id); App.AddNewBusUcControl(fq, "病人文书"); ((Form)this.ParentForm).Close(); } } } catch (Exception ex) { App.MsgErr(ex.Message); } }
private void flgview_DoubleClick(object sender, EventArgs e) { try { if (this.flgview.RowSel >= 1) { string patient_id = this.flgview[this.flgview.RowSel, "住院号"].ToString(); string sql = "select * from t_in_patient t where t.pid='" + patient_id + "'"; DataSet ds1 = App.GetDataSet(sql); if (ds1 != null) { if (ds1.Tables[0].Rows.Count > 0) { InPatientInfo patientInfo = DataInit.GetIninpatientByPid(ds1.Tables[0]); ucDoctorOperater fq = new ucDoctorOperater(patientInfo); App.UsControlStyle(fq); App.AddNewBusUcControl(fq, "病人文书"); } } } } catch (Exception ex) { App.MsgErr(ex.Message); } }
private void frmPatientDocShow_Load(object sender, EventArgs e) { if (PatientInfo != null) { ucDoctorOperater fq = new ucDoctorOperater(PatientInfo); fq.Dock = DockStyle.Fill; this.Controls.Add(fq); App.FormStytleSet(this, false); } }
private void dgvDocList_DoubleClick(object sender, EventArgs e) { if (dgvDocList.CurrentCell != null) { int n = this.dgvDocList.CurrentCell.RowIndex; string patientid = this.dgvDocList.Rows[n].Cells["患者ID"].Value.ToString(); InPatientInfo inpatient = DataInit.GetInpatientInfoByPid(patientid); ucDoctorOperater fq = new ucDoctorOperater(inpatient, "1", "1", "1"); App.UsControlStyle(fq); App.AddNewBusUcControl(fq, inpatient.Patient_Name + "文书查看"); } }
private void frmGrade_Load(object sender, EventArgs e) { //病案查阅 InPatientInfo inPatient = DataInit.GetInpatientInfoByPid(patientId); Base_Function.BASE_COMMON.DataInit.isRightRun = true; ucDoctorOperater fq = new ucDoctorOperater(inPatient); fq.Dock = DockStyle.Fill; App.UsControlStyle(fq); this.panel10.Controls.Add(fq); }
private void 病案查阅ToolStripMenuItem_Click(object sender, EventArgs e) { try { string patient_id = dgv.CurrentRow.Cells["id"].Value.ToString(); InPatientInfo inPatient = DataInit.GetInpatientInfoByPid(patient_id); DataInit.isRightRun = true; ucDoctorOperater fq = new ucDoctorOperater(inPatient); App.UsControlStyle(fq); App.AddNewBusUcControl(fq, "病人文书"); } catch (Exception ex) { } }
private void 病案查阅ToolStripMenuItem_Click(object sender, EventArgs e) { try { string patient_id = dgvPatientInfo.CurrentRow.Cells["编号"].Value.ToString(); InPatientInfo inPatient = DataInit.GetInpatientInfoByPid(patient_id); inPatient.PatientState = "借阅";//病人状态 string pageText = "借阅" + " " + inPatient.Patient_Name; DataInit.boolAgree = true; DataInit.isRightRun = true; ucDoctorOperater fq = new ucDoctorOperater(inPatient); App.UsControlStyle(fq); App.AddNewBusUcControl(fq, pageText); //((Form)this.ParentForm).Close(); } catch (Exception ex) { } }
public void fgDouble_Click(object sender, EventArgs e) { string id = ucC1FlexGrid1.fg[ucC1FlexGrid1.fg.RowSel, "id"].ToString(); if (id != null && id != "") { string sql = "select * from t_in_patient t where t.id='" + id + "'"; DataSet ds1 = App.GetDataSet(sql); if (ds1 != null) { if (ds1.Tables[0].Rows.Count > 0) { InPatientInfo patientInfo = new InPatientInfo(); patientInfo.Id = Convert.ToInt32(ds1.Tables[0].Rows[0]["id"]); patientInfo.Patient_Name = ds1.Tables[0].Rows[0]["Patient_Name"].ToString(); //if (ds1.Tables[0].Rows[0]["Gender_Code"].ToString().Equals("男")) //{ patientInfo.Gender_Code = ds1.Tables[0].Rows[0]["Gender_Code"].ToString(); //} //else //{ // patientInfo.Gender_Code = "1"; //} patientInfo.Marrige_State = ds1.Tables[0].Rows[0]["marriage_state"].ToString(); patientInfo.Medicare_no = ds1.Tables[0].Rows[0]["Medicare_no"].ToString(); patientInfo.Home_address = ds1.Tables[0].Rows[0]["Home_address"].ToString(); patientInfo.HomePostal_code = ds1.Tables[0].Rows[0]["HomePostal_code"].ToString(); patientInfo.Home_phone = ds1.Tables[0].Rows[0]["Home_phone"].ToString(); patientInfo.Office = ds1.Tables[0].Rows[0]["Office"].ToString(); patientInfo.Office_address = ds1.Tables[0].Rows[0]["Office_Address"].ToString(); patientInfo.Office_phone = ds1.Tables[0].Rows[0]["Office_phone"].ToString(); patientInfo.Relation = ds1.Tables[0].Rows[0]["Relation"].ToString(); patientInfo.Relation_address = ds1.Tables[0].Rows[0]["Relation_address"].ToString(); patientInfo.Relation_phone = ds1.Tables[0].Rows[0]["Relation_phone"].ToString(); patientInfo.RelationPos_code = ds1.Tables[0].Rows[0]["RelationPos_code"].ToString(); patientInfo.OfficePos_code = ds1.Tables[0].Rows[0]["OfficePos_code"].ToString(); if (ds1.Tables[0].Rows[0]["InHospital_Count"].ToString() != "") { patientInfo.InHospital_count = Convert.ToInt32(ds1.Tables[0].Rows[0]["InHospital_Count"].ToString()); } patientInfo.Cert_Id = ds1.Tables[0].Rows[0]["cert_id"].ToString(); patientInfo.Pay_Manager = ds1.Tables[0].Rows[0]["pay_manner"].ToString(); patientInfo.In_Circs = ds1.Tables[0].Rows[0]["IN_Circs"].ToString(); patientInfo.Natiye_place = ds1.Tables[0].Rows[0]["native_place"].ToString(); patientInfo.Birth_place = ds1.Tables[0].Rows[0]["Birth_place"].ToString(); patientInfo.Folk_code = ds1.Tables[0].Rows[0]["Folk_code"].ToString(); patientInfo.Birthday = ds1.Tables[0].Rows[0]["Birthday"].ToString(); patientInfo.PId = ds1.Tables[0].Rows[0]["PId"].ToString(); patientInfo.Insection_Id = Convert.ToInt32(ds1.Tables[0].Rows[0]["insection_id"]); patientInfo.Insection_Name = ds1.Tables[0].Rows[0]["insection_name"].ToString(); patientInfo.In_Area_Id = ds1.Tables[0].Rows[0]["in_area_id"].ToString(); patientInfo.In_Area_Name = ds1.Tables[0].Rows[0]["in_area_name"].ToString(); if (ds1.Tables[0].Rows[0]["Age"].ToString() != "") { patientInfo.Age = ds1.Tables[0].Rows[0]["Age"].ToString(); } else { if (patientInfo.Age == "0") { patientInfo.Age = Convert.ToString(App.GetSystemTime().Year - Convert.ToDateTime(patientInfo.Birthday).Year); patientInfo.Age_unit = "岁"; } } //inpatient.Action_State = row["action_state"].ToString(); patientInfo.Sick_Doctor_Id = ds1.Tables[0].Rows[0]["sick_doctor_id"].ToString(); patientInfo.Sick_Doctor_Name = ds1.Tables[0].Rows[0]["sick_doctor_name"].ToString(); if (ds1.Tables[0].Rows[0]["Sick_Area_Id"] != null) { patientInfo.Sike_Area_Id = ds1.Tables[0].Rows[0]["Sick_Area_Id"].ToString(); } patientInfo.Sick_Area_Name = ds1.Tables[0].Rows[0]["sick_area_name"].ToString(); if (ds1.Tables[0].Rows[0]["section_id"].ToString() != "") { patientInfo.Section_Id = Int32.Parse(ds1.Tables[0].Rows[0]["section_id"].ToString()); } patientInfo.Section_Name = ds1.Tables[0].Rows[0]["section_name"].ToString(); if (ds1.Tables[0].Rows[0]["in_time"] != null) { patientInfo.In_Time = DateTime.Parse(ds1.Tables[0].Rows[0]["in_time"].ToString()); } patientInfo.State = ds1.Tables[0].Rows[0]["state"].ToString(); if (ds1.Tables[0].Rows[0]["sick_bed_id"].ToString() != "") { patientInfo.Sick_Bed_Id = Int32.Parse(ds1.Tables[0].Rows[0]["sick_bed_id"].ToString()); } patientInfo.Sick_Bed_Name = ds1.Tables[0].Rows[0]["sick_bed_no"].ToString(); patientInfo.Age_unit = ds1.Tables[0].Rows[0]["age_unit"].ToString(); patientInfo.Sick_Degree = Convert.ToString(ds1.Tables[0].Rows[0]["Sick_Degree"]); if (ds1.Tables[0].Rows[0]["Die_flag"].ToString() != "") { patientInfo.Die_flag = Convert.ToInt32(ds1.Tables[0].Rows[0]["Die_flag"]); } patientInfo.Card_Id = ds1.Tables[0].Rows[0]["card_id"].ToString(); patientInfo.Nurse_Level = ds1.Tables[0].Rows[0]["nurse_level"].ToString(); patientInfo.Career = ds1.Tables[0].Rows[0]["Career"].ToString(); //职业 patientInfo.Out_Id = ds1.Tables[0].Rows[0]["out_id"].ToString(); //门诊号 patientInfo.Relation_name = ds1.Tables[0].Rows[0]["Relation_Name"].ToString(); //联系人姓名 ucDoctorOperater fq = new ucDoctorOperater(patientInfo); //new ucDoctorOperater(patientInfo, false, patientInfo.Id); App.UsControlStyle(fq); App.AddNewBusUcControl(fq, "病人文书"); } } } }
private void fg_DoubleClick(object sender, EventArgs e) { try { //获取病人ID string id = ucGridviewX1.fg.SelectedRows[0].Cells[0].Value.ToString(); string sql = "select * from t_in_patient t where t.id='" + id + "'"; DataSet ds1 = App.GetDataSet(sql); if (ds1 != null) { if (ds1.Tables[0].Rows.Count > 0) { InPatientInfo patientInfo = new InPatientInfo(); patientInfo.Id = Convert.ToInt32(ds1.Tables[0].Rows[0]["id"]); patientInfo.Patient_Name = ds1.Tables[0].Rows[0]["Patient_Name"].ToString(); patientInfo.Gender_Code = ds1.Tables[0].Rows[0]["Gender_Code"].ToString(); patientInfo.Marrige_State = ds1.Tables[0].Rows[0]["marriage_state"].ToString(); patientInfo.Medicare_no = ds1.Tables[0].Rows[0]["Medicare_no"].ToString(); patientInfo.Home_address = ds1.Tables[0].Rows[0]["Home_address"].ToString(); patientInfo.HomePostal_code = ds1.Tables[0].Rows[0]["HomePostal_code"].ToString(); patientInfo.Home_phone = ds1.Tables[0].Rows[0]["Home_phone"].ToString(); patientInfo.Office = ds1.Tables[0].Rows[0]["Office"].ToString(); patientInfo.Office_address = ds1.Tables[0].Rows[0]["Office_Address"].ToString(); patientInfo.Office_phone = ds1.Tables[0].Rows[0]["Office_phone"].ToString(); patientInfo.Relation = ds1.Tables[0].Rows[0]["Relation"].ToString(); patientInfo.Relation_address = ds1.Tables[0].Rows[0]["Relation_address"].ToString(); patientInfo.Relation_phone = ds1.Tables[0].Rows[0]["Relation_phone"].ToString(); patientInfo.RelationPos_code = ds1.Tables[0].Rows[0]["RelationPos_code"].ToString(); patientInfo.OfficePos_code = ds1.Tables[0].Rows[0]["OfficePos_code"].ToString(); if (ds1.Tables[0].Rows[0]["InHospital_Count"].ToString() != "") { patientInfo.InHospital_count = Convert.ToInt32(ds1.Tables[0].Rows[0]["InHospital_Count"].ToString()); } patientInfo.Cert_Id = ds1.Tables[0].Rows[0]["cert_id"].ToString(); patientInfo.Pay_Manager = ds1.Tables[0].Rows[0]["pay_manner"].ToString(); patientInfo.In_Circs = ds1.Tables[0].Rows[0]["IN_Circs"].ToString(); patientInfo.Natiye_place = ds1.Tables[0].Rows[0]["native_place"].ToString(); patientInfo.Birth_place = ds1.Tables[0].Rows[0]["Birth_place"].ToString(); patientInfo.Folk_code = ds1.Tables[0].Rows[0]["Folk_code"].ToString(); patientInfo.Birthday = ds1.Tables[0].Rows[0]["Birthday"].ToString(); patientInfo.PId = ds1.Tables[0].Rows[0]["PId"].ToString(); patientInfo.Insection_Id = Convert.ToInt32(ds1.Tables[0].Rows[0]["insection_id"]); patientInfo.Insection_Name = ds1.Tables[0].Rows[0]["insection_name"].ToString(); patientInfo.In_Area_Id = ds1.Tables[0].Rows[0]["in_area_id"].ToString(); patientInfo.In_Area_Name = ds1.Tables[0].Rows[0]["in_area_name"].ToString(); if (ds1.Tables[0].Rows[0]["Age"].ToString() != "") { patientInfo.Age = ds1.Tables[0].Rows[0]["Age"].ToString(); } else { if (patientInfo.Age == "0") { patientInfo.Age = Convert.ToString(App.GetSystemTime().Year - Convert.ToDateTime(patientInfo.Birthday).Year); patientInfo.Age_unit = "岁"; } } patientInfo.Sick_Doctor_Id = ds1.Tables[0].Rows[0]["sick_doctor_id"].ToString(); patientInfo.Sick_Doctor_Name = ds1.Tables[0].Rows[0]["sick_doctor_name"].ToString(); if (ds1.Tables[0].Rows[0]["Sick_Area_Id"] != null) { patientInfo.Sike_Area_Id = ds1.Tables[0].Rows[0]["Sick_Area_Id"].ToString(); } patientInfo.Sick_Area_Name = ds1.Tables[0].Rows[0]["sick_area_name"].ToString(); if (ds1.Tables[0].Rows[0]["section_id"].ToString() != "") { patientInfo.Section_Id = Int32.Parse(ds1.Tables[0].Rows[0]["section_id"].ToString()); } patientInfo.Section_Name = ds1.Tables[0].Rows[0]["section_name"].ToString(); if (ds1.Tables[0].Rows[0]["in_time"] != null) { patientInfo.In_Time = DateTime.Parse(ds1.Tables[0].Rows[0]["in_time"].ToString()); } patientInfo.State = ds1.Tables[0].Rows[0]["state"].ToString(); if (ds1.Tables[0].Rows[0]["sick_bed_id"].ToString() != "") { patientInfo.Sick_Bed_Id = Int32.Parse(ds1.Tables[0].Rows[0]["sick_bed_id"].ToString()); } patientInfo.Sick_Bed_Name = ds1.Tables[0].Rows[0]["sick_bed_no"].ToString(); patientInfo.Age_unit = ds1.Tables[0].Rows[0]["age_unit"].ToString(); patientInfo.Sick_Degree = Convert.ToString(ds1.Tables[0].Rows[0]["Sick_Degree"]); if (ds1.Tables[0].Rows[0]["Die_flag"].ToString() != "") { patientInfo.Die_flag = Convert.ToInt32(ds1.Tables[0].Rows[0]["Die_flag"]); } patientInfo.Card_Id = ds1.Tables[0].Rows[0]["card_id"].ToString(); patientInfo.Nurse_Level = ds1.Tables[0].Rows[0]["nurse_level"].ToString(); patientInfo.Career = ds1.Tables[0].Rows[0]["Career"].ToString(); //职业 patientInfo.Out_Id = ds1.Tables[0].Rows[0]["out_id"].ToString(); //门诊号 patientInfo.Relation_name = ds1.Tables[0].Rows[0]["Relation_Name"].ToString(); //联系人姓名 //frmMain fq = new frmMain(patientInfo, false, patientInfo.Id); ucDoctorOperater fq = new ucDoctorOperater(patientInfo); App.AddNewBusUcControl(fq, "病人文书"); } } } catch (Exception ex) { App.MsgErr(ex.Message); } }
private void fg_DoubleClick(object sender, EventArgs e) { //DataTable table = ds.Tables[0].Rows as DataTable; try { if (ucGridviewX1.fg.CurrentRow != null) { if (ucGridviewX1.fg.CurrentRow.Index >= 0) { if (ds != null && ds.Tables[0].Rows.Count > 0) { //int row = this.ucGridviewX1.fg.MouseRow; string id = ucGridviewX1.fg["ID", ucGridviewX1.fg.CurrentRow.Index].Value.ToString(); string pid = ucGridviewX1.fg["住院号", ucGridviewX1.fg.CurrentRow.Index].Value.ToString(); if (pid != "") { if (ucGridviewX1.fg["归档状态", ucGridviewX1.fg.CurrentRow.Index].Value.ToString() == "已归档") { boolFlag = true; } else { boolFlag = false; } string sql = "select * from t_in_patient t where t.id='" + id + "'"; DataSet ds1 = App.GetDataSet(sql); if (ds1 != null) { if (ds1.Tables[0].Rows.Count > 0) { InPatientInfo patientInfo = new InPatientInfo(); patientInfo.Id = Convert.ToInt32(ds1.Tables[0].Rows[0]["id"]); patientInfo.Patient_Name = ds1.Tables[0].Rows[0]["Patient_Name"].ToString(); //if (ds1.Tables[0].Rows[0]["Gender_Code"].ToString().Equals("男")) //{ patientInfo.Gender_Code = ds1.Tables[0].Rows[0]["Gender_Code"].ToString(); //} //else //{ // patientInfo.Gender_Code = "1"; //} patientInfo.Marrige_State = ds1.Tables[0].Rows[0]["marriage_state"].ToString(); patientInfo.Medicare_no = ds1.Tables[0].Rows[0]["Medicare_no"].ToString(); patientInfo.Home_address = ds1.Tables[0].Rows[0]["Home_address"].ToString(); patientInfo.HomePostal_code = ds1.Tables[0].Rows[0]["HomePostal_code"].ToString(); patientInfo.Home_phone = ds1.Tables[0].Rows[0]["Home_phone"].ToString(); patientInfo.Office = ds1.Tables[0].Rows[0]["Office"].ToString(); patientInfo.Office_address = ds1.Tables[0].Rows[0]["Office_Address"].ToString(); patientInfo.Office_phone = ds1.Tables[0].Rows[0]["Office_phone"].ToString(); patientInfo.Relation = ds1.Tables[0].Rows[0]["Relation"].ToString(); patientInfo.Relation_address = ds1.Tables[0].Rows[0]["Relation_address"].ToString(); patientInfo.Relation_phone = ds1.Tables[0].Rows[0]["Relation_phone"].ToString(); patientInfo.RelationPos_code = ds1.Tables[0].Rows[0]["RelationPos_code"].ToString(); patientInfo.OfficePos_code = ds1.Tables[0].Rows[0]["OfficePos_code"].ToString(); if (ds1.Tables[0].Rows[0]["InHospital_Count"].ToString() != "") { patientInfo.InHospital_count = Convert.ToInt32(ds1.Tables[0].Rows[0]["InHospital_Count"].ToString()); } patientInfo.Cert_Id = ds1.Tables[0].Rows[0]["cert_id"].ToString(); patientInfo.Pay_Manager = ds1.Tables[0].Rows[0]["pay_manner"].ToString(); patientInfo.In_Circs = ds1.Tables[0].Rows[0]["IN_Circs"].ToString(); patientInfo.Natiye_place = ds1.Tables[0].Rows[0]["native_place"].ToString(); patientInfo.Birth_place = ds1.Tables[0].Rows[0]["Birth_place"].ToString(); patientInfo.Folk_code = ds1.Tables[0].Rows[0]["Folk_code"].ToString(); patientInfo.Birthday = ds1.Tables[0].Rows[0]["Birthday"].ToString(); patientInfo.PId = ds1.Tables[0].Rows[0]["PId"].ToString(); patientInfo.Insection_Id = Convert.ToInt32(ds1.Tables[0].Rows[0]["insection_id"]); patientInfo.Insection_Name = ds1.Tables[0].Rows[0]["insection_name"].ToString(); patientInfo.In_Area_Id = ds1.Tables[0].Rows[0]["in_area_id"].ToString(); patientInfo.In_Area_Name = ds1.Tables[0].Rows[0]["in_area_name"].ToString(); if (ds1.Tables[0].Rows[0]["Age"].ToString() != "") { patientInfo.Age = ds1.Tables[0].Rows[0]["Age"].ToString(); } else { if (patientInfo.Age == "0") { patientInfo.Age = Convert.ToString(App.GetSystemTime().Year - Convert.ToDateTime(patientInfo.Birthday).Year); patientInfo.Age_unit = "岁"; } } //inpatient.Action_State = row["action_state"].ToString(); patientInfo.Sick_Doctor_Id = ds1.Tables[0].Rows[0]["sick_doctor_id"].ToString(); patientInfo.Sick_Doctor_Name = ds1.Tables[0].Rows[0]["sick_doctor_name"].ToString(); if (ds1.Tables[0].Rows[0]["Sick_Area_Id"] != null) { patientInfo.Sike_Area_Id = ds1.Tables[0].Rows[0]["Sick_Area_Id"].ToString(); } patientInfo.Sick_Area_Name = ds1.Tables[0].Rows[0]["sick_area_name"].ToString(); if (ds1.Tables[0].Rows[0]["section_id"].ToString() != "") { patientInfo.Section_Id = Int32.Parse(ds1.Tables[0].Rows[0]["section_id"].ToString()); } patientInfo.Section_Name = ds1.Tables[0].Rows[0]["section_name"].ToString(); if (ds1.Tables[0].Rows[0]["in_time"] != null) { patientInfo.In_Time = DateTime.Parse(ds1.Tables[0].Rows[0]["in_time"].ToString()); } patientInfo.State = ds1.Tables[0].Rows[0]["state"].ToString(); if (ds1.Tables[0].Rows[0]["sick_bed_id"].ToString() != "") { patientInfo.Sick_Bed_Id = Int32.Parse(ds1.Tables[0].Rows[0]["sick_bed_id"].ToString()); } patientInfo.Sick_Bed_Name = ds1.Tables[0].Rows[0]["sick_bed_no"].ToString(); patientInfo.Age_unit = ds1.Tables[0].Rows[0]["age_unit"].ToString(); patientInfo.Sick_Degree = Convert.ToString(ds1.Tables[0].Rows[0]["Sick_Degree"]); if (ds1.Tables[0].Rows[0]["Die_flag"].ToString() != "") { patientInfo.Die_flag = Convert.ToInt32(ds1.Tables[0].Rows[0]["Die_flag"]); } patientInfo.Card_Id = ds1.Tables[0].Rows[0]["card_id"].ToString(); patientInfo.Nurse_Level = ds1.Tables[0].Rows[0]["nurse_level"].ToString(); patientInfo.Career = ds1.Tables[0].Rows[0]["Career"].ToString(); //职业 patientInfo.Out_Id = ds1.Tables[0].Rows[0]["out_id"].ToString(); //门诊号 patientInfo.Relation_name = ds1.Tables[0].Rows[0]["Relation_Name"].ToString(); //联系人姓名 inpatent = patientInfo; //inpatent.Action_State = "借阅"; inpatent.PatientState = "借阅"; DataInit.boolAgree = true; ucDoctorOperater fq = new ucDoctorOperater(patientInfo); App.UsControlStyle(fq); App.AddNewBusUcControl(fq, patientInfo.Patient_Name + "文书借阅"); } } } //InPatientInfo temppatient = new InPatientInfo(); //temppatient.Id = Convert.ToInt32(ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "ID"].ToString()); //temppatient.In_Bed_Name = ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "床号"].ToString(); //temppatient.PId = ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "住院号"].ToString(); //temppatient.Patient_Name = ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "姓名"].ToString(); //temppatient.Section_Name = ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "section_name"].ToString(); ////string aa = ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "年龄"].ToString(); //if (temppatient.Age == 0) //{ // ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "年龄"] = "0"; //} //else //{ // ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "年龄"] = temppatient.Age; //} //if (ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "归档状态"].ToString() == "已归档") //{ // boolFlag = true; //} //else //{ // boolFlag = false; //} //temppatient.Sick_Bed_Name = ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "床号"].ToString(); //temppatient.Gender_Code = ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "性别"].ToString(); //temppatient.In_Time = Convert.ToDateTime(ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "住院日期"].ToString()); //temppatient.Sick_Area_Name = ucGridviewX1.fg[ucGridviewX1.fg.RowSel, "当前科室"].ToString(); //frmMain fq = new frmMain(temppatient, boolFlag); //App.AddNewChildForm(fq); } } } } catch (Exception ex) { App.MsgErr(ex.Message); } }
private void c1FlexGrid1_DoubleClick(object sender, EventArgs e) { c1FlexGrid1.AllowEditing = false; int rows = this.c1FlexGrid1.RowSel;//定义选中的行号 if (rows > 0) { if (oldRow2 == rows) { this.c1FlexGrid1.Rows[rows].StyleNew.BackColor = ColorTranslator.FromHtml("#9BB9ED"); } else { //如果不是头行 if (rows > 0) { //就改变背景色 this.c1FlexGrid1.Rows[rows].StyleNew.BackColor = ColorTranslator.FromHtml("#9BB9ED"); } if (oldRow2 > 0 && dt2.Rows.Count >= oldRow) { //定义上一次点击过的行还原 this.c1FlexGrid1.Rows[oldRow2].StyleNew.BackColor = c1FlexGrid1.BackColor; } } try { string id = this.c1FlexGrid1[c1FlexGrid1.RowSel, "编号"].ToString().ToString(); if (id != null && id != "") { string sql = "select * from t_in_patient t where t.id='" + id + "'"; DataSet ds1 = App.GetDataSet(sql); if (ds1 != null) { if (ds1.Tables[0].Rows.Count > 0) { InPatientInfo patientInfo = new InPatientInfo(); patientInfo.Id = Convert.ToInt32(ds1.Tables[0].Rows[0]["id"]); patientInfo.Patient_Name = ds1.Tables[0].Rows[0]["Patient_Name"].ToString(); //if (ds1.Tables[0].Rows[0]["Gender_Code"].ToString().Equals("男")) //{ patientInfo.Gender_Code = ds1.Tables[0].Rows[0]["Gender_Code"].ToString(); //} //else //{ // patientInfo.Gender_Code = "1"; //} patientInfo.Marrige_State = ds1.Tables[0].Rows[0]["marriage_state"].ToString(); patientInfo.Medicare_no = ds1.Tables[0].Rows[0]["Medicare_no"].ToString(); patientInfo.Home_address = ds1.Tables[0].Rows[0]["Home_address"].ToString(); patientInfo.HomePostal_code = ds1.Tables[0].Rows[0]["HomePostal_code"].ToString(); patientInfo.Home_phone = ds1.Tables[0].Rows[0]["Home_phone"].ToString(); patientInfo.Office = ds1.Tables[0].Rows[0]["Office"].ToString(); patientInfo.Office_address = ds1.Tables[0].Rows[0]["Office_Address"].ToString(); patientInfo.Office_phone = ds1.Tables[0].Rows[0]["Office_phone"].ToString(); patientInfo.Relation = ds1.Tables[0].Rows[0]["Relation"].ToString(); patientInfo.Relation_address = ds1.Tables[0].Rows[0]["Relation_address"].ToString(); patientInfo.Relation_phone = ds1.Tables[0].Rows[0]["Relation_phone"].ToString(); patientInfo.RelationPos_code = ds1.Tables[0].Rows[0]["RelationPos_code"].ToString(); patientInfo.OfficePos_code = ds1.Tables[0].Rows[0]["OfficePos_code"].ToString(); if (ds1.Tables[0].Rows[0]["InHospital_Count"].ToString() != "") { patientInfo.InHospital_count = Convert.ToInt32(ds1.Tables[0].Rows[0]["InHospital_Count"].ToString()); } patientInfo.Cert_Id = ds1.Tables[0].Rows[0]["cert_id"].ToString(); patientInfo.Pay_Manager = ds1.Tables[0].Rows[0]["pay_manner"].ToString(); patientInfo.In_Circs = ds1.Tables[0].Rows[0]["IN_Circs"].ToString(); patientInfo.Natiye_place = ds1.Tables[0].Rows[0]["native_place"].ToString(); patientInfo.Birth_place = ds1.Tables[0].Rows[0]["Birth_place"].ToString(); patientInfo.Folk_code = ds1.Tables[0].Rows[0]["Folk_code"].ToString(); patientInfo.Birthday = ds1.Tables[0].Rows[0]["Birthday"].ToString(); patientInfo.PId = ds1.Tables[0].Rows[0]["PId"].ToString(); patientInfo.Insection_Id = Convert.ToInt32(ds1.Tables[0].Rows[0]["insection_id"]); patientInfo.Insection_Name = ds1.Tables[0].Rows[0]["insection_name"].ToString(); patientInfo.In_Area_Id = ds1.Tables[0].Rows[0]["in_area_id"].ToString(); patientInfo.In_Area_Name = ds1.Tables[0].Rows[0]["in_area_name"].ToString(); if (ds1.Tables[0].Rows[0]["Age"].ToString() != "") { patientInfo.Age = ds1.Tables[0].Rows[0]["Age"].ToString(); } else { if (patientInfo.Age == "0") { patientInfo.Age = Convert.ToString(App.GetSystemTime().Year - Convert.ToDateTime(patientInfo.Birthday).Year); patientInfo.Age_unit = "岁"; } } //inpatient.Action_State = row["action_state"].ToString(); patientInfo.Sick_Doctor_Id = ds1.Tables[0].Rows[0]["sick_doctor_id"].ToString(); patientInfo.Sick_Doctor_Name = ds1.Tables[0].Rows[0]["sick_doctor_name"].ToString(); if (ds1.Tables[0].Rows[0]["Sick_Area_Id"] != null) { patientInfo.Sike_Area_Id = ds1.Tables[0].Rows[0]["Sick_Area_Id"].ToString(); } patientInfo.Sick_Area_Name = ds1.Tables[0].Rows[0]["sick_area_name"].ToString(); if (ds1.Tables[0].Rows[0]["section_id"].ToString() != "") { patientInfo.Section_Id = Int32.Parse(ds1.Tables[0].Rows[0]["section_id"].ToString()); } patientInfo.Section_Name = ds1.Tables[0].Rows[0]["section_name"].ToString(); if (ds1.Tables[0].Rows[0]["in_time"] != null) { patientInfo.In_Time = DateTime.Parse(ds1.Tables[0].Rows[0]["in_time"].ToString()); } patientInfo.State = ds1.Tables[0].Rows[0]["state"].ToString(); if (ds1.Tables[0].Rows[0]["sick_bed_id"].ToString() != "") { patientInfo.Sick_Bed_Id = Int32.Parse(ds1.Tables[0].Rows[0]["sick_bed_id"].ToString()); } patientInfo.Sick_Bed_Name = ds1.Tables[0].Rows[0]["sick_bed_no"].ToString(); patientInfo.Age_unit = ds1.Tables[0].Rows[0]["age_unit"].ToString(); patientInfo.Sick_Degree = Convert.ToString(ds1.Tables[0].Rows[0]["Sick_Degree"]); if (ds1.Tables[0].Rows[0]["Die_flag"].ToString() != "") { patientInfo.Die_flag = Convert.ToInt32(ds1.Tables[0].Rows[0]["Die_flag"]); } patientInfo.Card_Id = ds1.Tables[0].Rows[0]["card_id"].ToString(); patientInfo.Nurse_Level = ds1.Tables[0].Rows[0]["nurse_level"].ToString(); patientInfo.Career = ds1.Tables[0].Rows[0]["Career"].ToString(); //职业 patientInfo.Out_Id = ds1.Tables[0].Rows[0]["out_id"].ToString(); //门诊号 patientInfo.Relation_name = ds1.Tables[0].Rows[0]["Relation_Name"].ToString(); //联系人姓名 ucDoctorOperater fq = new ucDoctorOperater(patientInfo); //new ucDoctorOperater(patientInfo, false, patientInfo.Id); App.UsControlStyle(fq); App.AddNewBusUcControl(fq, "病人文书"); frmGrade fg = new frmGrade(this); fg.Show(); fg.TopMost = true; } } } } catch (Exception ex) { } } //给上一次的行号赋值 oldRow2 = rows; }