private void pingfentoolStripMenuItem1_Click(object sender, EventArgs e) { if (c1FlexGrid1.RowSel <= 0) { App.Msg("您还未选中要评分的人"); return; } frmGrade fg = new frmGrade(this); fg.ShowDialog(); }
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; }