/// <summary> /// 双击数字,显示相应的病人信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void flgview_DoubleClick(object sender, EventArgs e) { if (flgview[flgview.RowSel, flgview.ColSel] != null && App.IsNumeric(flgview[flgview.RowSel, flgview.ColSel].ToString())) { //flgview[flgview.RowSel, "在院人数"]; DataTable dt = new DataTable(); //第一级列头 //选中行行头 string rowname = flgview[flgview.RowSel, 0].ToString(); //第二级列头 string colname = flgview[0, flgview.ColSel].ToString(); if (colname.Contains("会诊") || colname.Contains("率")) { App.Msg("会诊、概率统计没有病人详细信息"); return; } switch (colname) { case "入院人数": dt = ds.Tables["into_area"]; break; case "出院人数": dt = ds.Tables["out_area"]; break; case "手术人数": dt = ds.Tables["operate"]; break; case "病危人数": dt = ds.Tables["danger"]; break; case "病重人数": dt = ds.Tables["bad"]; break; case "转出人次": dt = ds.Tables["turn_out"]; break; case "转入人次": dt = ds.Tables["turn_in"]; break; } //入院诊断 DataTable dt_inDiag = ds.Tables["indiag"]; //出院诊断 DataTable dt_outDiag = ds.Tables["outdiag"]; if (rowname == "全院") { if (colname == "手术人数") { frmOpration_PatientInfo frmOper = new frmOpration_PatientInfo(dt); frmOper.ShowDialog(); } else if (colname == "入院人数" || colname == "出院人数") { frmInOut_PatientInfo patientInfo = new frmInOut_PatientInfo(dt, dt_inDiag, dt_outDiag); patientInfo.ShowDialog(); } else if (colname == "转出人次" || colname == "转入人次") { frmTurnInOut_PatientInfo patientInfo = new frmTurnInOut_PatientInfo(dt); patientInfo.ShowDialog(); } else { frmInOut_PatientInfo patientInfo = new frmInOut_PatientInfo(dt); patientInfo.ShowDialog(); } } else if (searchName == "按病区")//按病区 { DataTable dt_sick_area = new DataTable(); DataRow[] dr = dt.Select("sick_area_name='" + rowname + "'"); dt_sick_area = dt.Clone(); for (int i = 0; i < dr.Length; i++) { dt_sick_area.Rows.Add(dr[i].ItemArray); } if (colname == "手术人数") { frmOpration_PatientInfo frmOper = new frmOpration_PatientInfo(dt_sick_area); frmOper.ShowDialog(); } else if (colname == "入院人数" || colname == "出院人数") { frmInOut_PatientInfo patientInfo = new frmInOut_PatientInfo(dt_sick_area, dt_inDiag, dt_outDiag); patientInfo.ShowDialog(); } else if (colname == "转出人次" || colname == "转入人次") { frmTurnInOut_PatientInfo patientInfo = new frmTurnInOut_PatientInfo(dt_sick_area); patientInfo.ShowDialog(); } else { frmInOut_PatientInfo patientInfo = new frmInOut_PatientInfo(dt_sick_area); patientInfo.ShowDialog(); } } else if (searchName == "按科室")//按科室 { DataTable dt_section = new DataTable(); DataRow[] dr = dt.Select("section_name='" + rowname + "'"); dt_section = dt.Clone(); for (int i = 0; i < dr.Length; i++) { dt_section.Rows.Add(dr[i].ItemArray); } if (colname == "手术人数") { frmOpration_PatientInfo frmOper = new frmOpration_PatientInfo(dt_section); frmOper.ShowDialog(); } else if (colname == "入院人数" || colname == "出院人数") { frmInOut_PatientInfo patientInfo = new frmInOut_PatientInfo(dt_section, dt_inDiag, dt_outDiag); patientInfo.ShowDialog(); } else if (colname == "转出人次" || colname == "转入人次") { frmTurnInOut_PatientInfo patientInfo = new frmTurnInOut_PatientInfo(dt_section); patientInfo.ShowDialog(); } else { frmInOut_PatientInfo patientInfo = new frmInOut_PatientInfo(dt_section); patientInfo.ShowDialog(); } } } }
/// <summary> /// 双击数字,显示相应的病人信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void flgview_DoubleClick(object sender, EventArgs e) { if (flgview[flgview.RowSel, flgview.ColSel] != null && App.IsNumeric(flgview[flgview.RowSel, flgview.ColSel].ToString())) { //flgview[flgview.RowSel, "在院人数"]; DataTable dt = new DataTable(); //第一级列头 //选中行行头 string rowname = flgview[flgview.RowSel, 0].ToString(); //第二级列头 string colname = flgview[0, flgview.ColSel].ToString(); if (colname.Contains("会诊")) { App.Msg("会诊统计没有病人详细信息"); return; } switch (colname) { case "入院人数": dt = ds.Tables["into_area"]; break; case "出院人数": dt = ds.Tables["out_area"]; break; case "手术人数": dt = ds.Tables["operate"]; break; case "治愈人数": dt = ds.Tables["zhiyu"]; break; case "好转人数": dt = ds.Tables["haozhuan"]; break; case "死亡人数": dt = ds.Tables["death"]; break; case "未愈人数": dt = ds.Tables["weiyu"]; break; case "转出人次": dt = ds.Tables["turn_out"]; break; case "转入人次": dt = ds.Tables["turn_in"]; break; } //入院诊断 DataTable dt_inDiag = ds.Tables["allin_diag"]; //出院诊断 DataTable dt_outDiag = ds.Tables["allout_diag"]; if (rowname == "全院") { if (colname == "治愈人数" || colname == "好转人数" || colname == "未愈人数") { frmTurnTo_PatientInfo patientInfo = new frmTurnTo_PatientInfo(dt, dt_inDiag, dt_outDiag); patientInfo.ShowDialog(); } else if (colname == "手术人数") { frmOpration_PatientInfo.beginTime = dtpStart.Value.ToString(); frmOpration_PatientInfo.endTime = dtpEnd.Value.ToString(); frmOpration_PatientInfo.sectionName = rowname; frmOpration_PatientInfo frmOper = new frmOpration_PatientInfo(dt); frmOper.ShowDialog(); } else if (colname == "死亡人数") { frmTurnToDie_PatientInfo.beginTime = dtpStart.Value.ToString(); frmTurnToDie_PatientInfo.endTime = dtpEnd.Value.ToString(); frmTurnToDie_PatientInfo.sectionName = rowname; frmTurnToDie_PatientInfo frmDie = new frmTurnToDie_PatientInfo(dt, dt_inDiag); frmDie.ShowDialog(); } else if (colname == "入院人数" || colname == "出院人数") { frmInOut_PatientInfo.titleName = colname.Substring(0, 2); frmInOut_PatientInfo.sectionName = rowname; frmInOut_PatientInfo.beginTime = dtpStart.Value.ToString(); frmInOut_PatientInfo.endTime = dtpEnd.Value.ToString(); frmInOut_PatientInfo patientInfo = new frmInOut_PatientInfo(dt, dt_inDiag, dt_outDiag); patientInfo.ShowDialog(); } else if (colname == "转出人次" || colname == "转入人次") { frmTurnInOut_PatientInfo patientInfo = new frmTurnInOut_PatientInfo(dt); patientInfo.ShowDialog(); } else { frmInOut_PatientInfo patientInfo = new frmInOut_PatientInfo(dt); patientInfo.ShowDialog(); } } if (searchName == "按病区")//按病区 { DataTable dt_sick_area = new DataTable(); DataRow[] dr = dt.Select("sick_area_name='" + rowname + "'"); dt_sick_area = dt.Clone(); for (int i = 0; i < dr.Length; i++) { dt_sick_area.Rows.Add(dr[i].ItemArray); } if (colname == "治愈人数" || colname == "好转人数" || colname == "未愈人数") { frmTurnTo_PatientInfo patientInfo = new frmTurnTo_PatientInfo(dt_sick_area, dt_inDiag, dt_outDiag); patientInfo.ShowDialog(); } else if (colname == "手术人数") { //用于报表显示的参数 frmOpration_PatientInfo.beginTime = dtpStart.Value.ToString(); frmOpration_PatientInfo.endTime = dtpEnd.Value.ToString(); frmOpration_PatientInfo.sectionName = rowname; frmOpration_PatientInfo frmOper = new frmOpration_PatientInfo(dt_sick_area); frmOper.ShowDialog(); } else if (colname == "死亡人数") { frmTurnToDie_PatientInfo.beginTime = dtpStart.Value.ToString(); frmTurnToDie_PatientInfo.endTime = dtpEnd.Value.ToString(); frmTurnToDie_PatientInfo.sectionName = rowname; frmTurnToDie_PatientInfo frmDie = new frmTurnToDie_PatientInfo(dt_sick_area, dt_inDiag); frmDie.ShowDialog(); } else if (colname == "入院人数" || colname == "出院人数") { frmInOut_PatientInfo.titleName = colname.Substring(0, 2); frmInOut_PatientInfo.sectionName = rowname; frmInOut_PatientInfo.beginTime = dtpStart.Value.ToString(); frmInOut_PatientInfo.endTime = dtpEnd.Value.ToString(); frmInOut_PatientInfo patientInfo = new frmInOut_PatientInfo(dt_sick_area, dt_inDiag, dt_outDiag); patientInfo.ShowDialog(); } else if (colname == "转出人次" || colname == "转入人次") { frmTurnInOut_PatientInfo patientInfo = new frmTurnInOut_PatientInfo(dt_sick_area); patientInfo.ShowDialog(); } else { frmInOut_PatientInfo patientInfo = new frmInOut_PatientInfo(dt_sick_area); patientInfo.ShowDialog(); } } if (searchName == "按科室")//按科室 { DataTable dt_section = new DataTable(); DataRow[] dr = dt.Select("section_name='" + rowname + "'"); dt_section = dt.Clone(); for (int i = 0; i < dr.Length; i++) { dt_section.Rows.Add(dr[i].ItemArray); } if (colname == "治愈人数" || colname == "好转人数" || colname == "未愈人数") { frmTurnTo_PatientInfo patientInfo = new frmTurnTo_PatientInfo(dt_section, dt_inDiag, dt_outDiag); patientInfo.ShowDialog(); } else if (colname == "手术人数") { //用于报表显示的参数 frmOpration_PatientInfo.beginTime = dtpStart.Value.ToString(); frmOpration_PatientInfo.endTime = dtpEnd.Value.ToString(); frmOpration_PatientInfo.sectionName = rowname; frmOpration_PatientInfo frmOper = new frmOpration_PatientInfo(dt_section); frmOper.ShowDialog(); } else if (colname == "死亡人数") { frmTurnToDie_PatientInfo.beginTime = dtpStart.Value.ToString(); frmTurnToDie_PatientInfo.endTime = dtpEnd.Value.ToString(); frmTurnToDie_PatientInfo.sectionName = rowname; frmTurnToDie_PatientInfo frmDie = new frmTurnToDie_PatientInfo(dt_section, dt_inDiag); frmDie.ShowDialog(); } else if (colname == "入院人数" || colname == "出院人数") { frmInOut_PatientInfo.titleName = colname.Substring(0, 2); frmInOut_PatientInfo.sectionName = rowname; frmInOut_PatientInfo.beginTime = dtpStart.Value.ToString(); frmInOut_PatientInfo.endTime = dtpEnd.Value.ToString(); frmInOut_PatientInfo patientInfo = new frmInOut_PatientInfo(dt_section, dt_inDiag, dt_outDiag); patientInfo.ShowDialog(); } else if (colname == "转出人次" || colname == "转入人次") { frmTurnInOut_PatientInfo patientInfo = new frmTurnInOut_PatientInfo(dt_section); patientInfo.ShowDialog(); } else { frmInOut_PatientInfo patientInfo = new frmInOut_PatientInfo(dt_section); patientInfo.ShowDialog(); } } } }