/// <summary> /// Init /// </summary> void Init() { try { clsPublic.PlayAvi("请稍候..."); this.lblPatName.Text = patVo.m_strPatientName; this.lblAreaName.Text = patVo.m_strAreaName; this.lblBedNo.Text = patVo.m_strBedName; this.lblIpNo.Text = patVo.m_strInHospitalNo; this.lblSex.Text = patVo.m_strSex; this.lblAge.Text = patVo.m_strAge; this.lblNoticeDate.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm"); DataTable dt = null; clsOperationRequisitionService_Oracle svc1 = (clsOperationRequisitionService_Oracle)clsObjectGenerator.objCreatorObjectByType(typeof(clsOperationRequisitionService_Oracle)); svc1.m_lngQueryDiagnosis(patVo.m_strPatientID, out dt); svc1 = null; if (dt != null && dt.Rows.Count > 0) { DataView dv = dt.DefaultView; dv.Sort = "inpatient_dat desc"; diagDesc = dv[0]["primarydiagnoseall"].ToString().Trim(); } clsAssistDicService_2 svc2 = (clsAssistDicService_2)clsObjectGenerator.objCreatorObjectByType(typeof(clsAssistDicService_2)); svc2.m_lngGetOperationName(out dt); svc2 = null; if (dt != null && dt.Rows.Count > 0) { this.txtOpName.DataSource = dt; this.txtOpName.TextColumnIndex = 1; this.txtOpName.ValueColumnIndex = 0; this.txtOpName.AutoMatch = true; this.txtOpName.MaxDataGridWidth = 1000; } clsEmrSignToolCollection tools = new clsEmrSignToolCollection(); tools.m_mthBindEmployeeSign(this.btnDoctMain, this.txtDoctMain, 1, false); tools.m_mthBindEmployeeSign(this.btnDoctAss1, this.txtDoctAss1, 1, false); tools.m_mthBindEmployeeSign(this.btnDoctAss2, this.txtDoctAss2, 1, false); tools.m_mthBindEmployeeSign(this.btnDoctAss3, this.txtDoctAss3, 1, false); clsBIHOrderService svc3 = new clsDcl_GetSvcObject().m_GetOrderSvcObject(); this.isStepControl = svc3.IsOpStepControl(); svc3 = null; GetHistory(); New(); } finally { clsPublic.CloseAvi(); } }
/// <summary> /// Delete /// </summary> void Delete() { if (this.dtpOpDate.Tag == null) { SetData(null, null); } else { if (MessageBox.Show("删除前请再次确认?", "系统提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { DataRow dr = this.dtpOpDate.Tag as DataRow; Dictionary <string, string> dicData = new Dictionary <string, string>(); dicData.Add("AnaId", dr["anaid_int"].ToString()); dicData.Add("OpenDate", dr["opendate_dat"].ToString()); dicData.Add("SignSequence", dr["signsequence_int"].ToString()); try { decimal anaId = 0; DateTime openDate = DateTime.Now; this.Cursor = Cursors.WaitCursor; clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject(); int ret = svc.SaveOpApply(patVo, dicData, out anaId, out openDate, true); svc = null; if (ret > 0) { this.GetHistory(); SetData(null, null); MessageBox.Show("删除成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("删除失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch (Exception ex) { MessageBox.Show(ex.Message, "删除异常", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { this.Cursor = Cursors.Default; } } } }
private void m_txtDoctor_m_evtFindItem(object sender, string strFindCode, System.Windows.Forms.ListView lvwList) { //clsBIHOrderService m_objService = new clsBIHOrderService(); clsBIHOrderService m_objService = new clsDcl_GetSvcObject().m_GetOrderSvcObject(); clsBIHDoctor[] arrDoctor; long ret = m_objService.m_lngFindDoctor(strFindCode, out arrDoctor); if ((ret > 0) && (arrDoctor != null)) { for (int i = 0; i < arrDoctor.Length; i++) { ListViewItem lvi = lvwList.Items.Add(arrDoctor[i].m_strDoctorNo); lvi.SubItems.Add(arrDoctor[i].m_strDoctorName); lvi.Tag = arrDoctor[i]; } } }
/// <summary> /// Load /// </summary> void LoadData(decimal anaId, DateTime openDate) { try { this.Cursor = Cursors.WaitCursor; DataTable dtMain = null; DataTable dtSign = null; clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject(); svc.GetOpRecord(anaId, openDate, out dtMain, out dtSign); if (dtMain != null && dtMain.Rows.Count > 0) { DataRow dr = dtMain.Rows[0]; SetData(dr, dtSign); } } finally { this.Cursor = Cursors.Default; } }
/// <summary> /// GetHistory /// </summary> void GetHistory() { this.lvHistory.Items.Clear(); clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject(); DataTable dt = svc.GetOpHistory(patVo.m_strPatientID); if (dt != null && dt.Rows.Count > 0) { ListViewItem obj = null; this.lvHistory.BeginUpdate(); foreach (DataRow dr in dt.Rows) { obj = new ListViewItem(); obj.Text = Convert.ToDateTime(dr["opendate_dat"]).ToString("yyyy-MM-dd HH:mm"); obj.Tag = dr; this.lvHistory.Items.Add(obj); } this.lvHistory.EndUpdate(); } }
/// <summary> /// Stop /// </summary> void Stop() { if (this.dtpOpDate.Tag == null) { MessageBox.Show("手术申请还未保存,不能取消。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } DataRow dr = this.dtpOpDate.Tag as DataRow; decimal anaId = Convert.ToDecimal(dr["anaid_int"]); DateTime openDate = Convert.ToDateTime(dr["opendate_dat"].ToString()); if (MessageBox.Show("取消手术前请再次确认?", "系统提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { try { this.Cursor = Cursors.WaitCursor; clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject(); int ret = svc.CancelOpApply(anaId, openDate, LoginInfo.m_strEmpID); svc = null; if (ret > 0) { MessageBox.Show("取消手术成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); this.GetHistory(); LoadData(anaId, openDate); } else { MessageBox.Show("取消手术失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch (Exception ex) { MessageBox.Show(ex.Message, "取消手术异常", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { this.Cursor = Cursors.Default; } } }
/// <summary> /// Print /// </summary> void Print() { if (this.dtpOpDate.Tag == null) { MessageBox.Show("手术申请还未保存,不能打印。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } DataRow dr = this.dtpOpDate.Tag as DataRow; clsSchedulingPrintTool print = new clsSchedulingPrintTool(); clsOperation operation = new clsOperation(); clsOperationRequisition prtVo = new clsOperationRequisition(); clsPatientBaseInfo_VO pVo = new clsPatientBaseInfo_VO(); #region prtVo if (dr["approval_date"] != DBNull.Value) { prtVo.m_dtConfirmdat_dat = Convert.ToDateTime(dr["approval_date"]); prtVo.m_intIfconfirm = 1; prtVo.m_intIfConfirm = 1; prtVo.m_intIscomfim_int = 1; } prtVo.m_dtmApplyOperationDate = dr["operationdate_dat"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(dr["operationdate_dat"]); // Convert.ToDateTime("2016-11-10 10:10:00"); prtVo.m_dtmNoticeDate = Convert.ToDateTime(this.lblNoticeDate.Text); prtVo.m_dtmOperationDate = prtVo.m_dtmApplyOperationDate; //Convert.ToDateTime(dr["operationdate_dat"]); prtVo.m_dtmOperationEnd = prtVo.m_dtmOperationDate; // Convert.ToDateTime(""); prtVo.m_dtmInPatientDate = dr["inpatientdate_dat"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(dr["inpatientdate_dat"]); prtVo.m_dtmCreateDate = Convert.ToDateTime(dr["opendate_dat"]); //prtVo.m_dtmDeActivedDate = Convert.ToDateTime("2016-11-12 10:10:00"); prtVo.m_dtmModifyDate = dr["modifydate_dat"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(dr["modifydate_dat"]); prtVo.m_dtmOpenDate = Convert.ToDateTime(dr["opendate_dat"]); prtVo.m_dtmOperationEnd = prtVo.m_dtmOpenDate; //Convert.ToDateTime("2016-11-12 10:10:00"); prtVo.m_intBacterium = 0; prtVo.m_intEmergency = dr["isemergency_int"] == DBNull.Value ? 0 : Convert.ToInt32(dr["isemergency_int"]); prtVo.m_intFrom_int = dr["from_int"] == DBNull.Value ? 0 : Convert.ToInt32(dr["from_int"]); prtVo.m_intIsContinuedOperation = dr["iscontinuedoperation_int"] == DBNull.Value ? 0 : Convert.ToInt32(dr["iscontinuedoperation_int"]); prtVo.m_intISMINIINVASIVE = dr["isminiinvasive_int"] == DBNull.Value ? 0 : Convert.ToInt32(dr["isminiinvasive_int"]); prtVo.m_intIsOperationICF = dr["issignedicf"] == DBNull.Value ? 0 : Convert.ToInt32(dr["issignedicf"]); prtVo.m_strAge_vchr = dr["age_vchr"].ToString(); prtVo.m_strAnadeptid_chr = dr["anadeptid_chr"].ToString(); prtVo.m_strAnaMode = dr["anamode_chr"].ToString(); prtVo.m_strBedno_vchr = dr["bedno_vchr"].ToString(); prtVo.m_strConfirmid_vchr = dr["confirmid_vchr"].ToString(); prtVo.m_strContinuedoperation_vchr = dr["continuedoperation_vchr"].ToString(); prtVo.m_strDeptID = dr["deptid_chr"].ToString(); prtVo.m_strDiagnose = dr["preoperativediagnosis_chr"].ToString(); //prtVo.m_strDiagnoseicd10_vchr = dr[""].ToString(); prtVo.m_strDiseaseName = dr["diseasename_chr"].ToString(); prtVo.m_strEmergency = dr["emergency_chr"].ToString(); if (dr["isisolated_int"] != DBNull.Value) { if (dr["isisolated_int"].ToString() == "1") { prtVo.m_strIsOlationIndicator = "正常"; } else if (dr["isisolated_int"].ToString() == "2") { prtVo.m_strIsOlationIndicator = "隔离"; } else if (dr["isisolated_int"].ToString() == "3") { prtVo.m_strIsOlationIndicator = "放射"; } } //prtVo.m_strOperationcode_vchr = dr[""].ToString(); prtVo.m_strOperationName = dr["operationname_chr"].ToString(); prtVo.m_strOperationPart = dr["operationpart_chr"].ToString(); prtVo.m_strOperationRoomID = dr["operationroomid_chr"].ToString(); //prtVo.m_strOperationRoomName = dr[""].ToString(); //prtVo.m_strOperationScale = dr[""].ToString(); //prtVo.m_strORDERID_CHR = dr[""].ToString(); prtVo.m_strPatientname_vchr = dr["patientname_vchr"].ToString(); prtVo.m_strRemark = dr["remark_chr"].ToString(); prtVo.m_strRollbackreason = dr["rollbackreason"].ToString(); //prtVo.m_strSequence = dr["signsequence_int"].ToString(); prtVo.m_strSex_vchr = dr["sex_vchr"].ToString(); prtVo.m_strSpecialCase = dr["specialcase_chr"].ToString(); prtVo.m_strVisitor = dr["visitor_chr"].ToString(); prtVo.m_strWeight = dr["weight_chr"].ToString(); prtVo.strOPENDATEOriginal = dr["opendate_dat"].ToString(); clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject(); DataTable dtSign = svc.GetOpRecordSign(Convert.ToDecimal(dr["signsequence_int"])); if (dtSign != null && dtSign.Rows.Count > 0) { string doctType = string.Empty; string doctName = string.Empty; clsEmrSigns_VO signVo = null; prtVo.objSignerArr = new List <clsEmrSigns_VO>(); //new clsEmrSigns_VO[dtSign.Rows.Count];//List<clsEmrSigns_VO>(); //for (int j = 0; j < dtSign.Rows.Count; j++) //{ // doctType = dtSign.Rows[j]["tag_chr"].ToString().Trim(); // doctName = dtSign.Rows[j]["employeename_chr"].ToString().Trim(); // prtVo.objSignerArr[j]. //} foreach (DataRow dr2 in dtSign.Rows) { if (dr2["tag_chr"] != DBNull.Value && dr2["employeename_chr"] != DBNull.Value) { doctType = dr2["tag_chr"].ToString().Trim(); doctName = dr2["employeename_chr"].ToString().Trim(); signVo = new clsEmrSigns_VO(); signVo.controlName = doctType; signVo.objEmployee = new clsEmrEmployeeBase_VO(); signVo.objEmployee.m_strLASTNAME_VCHR = doctName; prtVo.objSignerArr.Add(signVo); } } } #endregion #region patVo pVo.m_datBirthDate = patVo.m_dtBorn; pVo.m_datEmrInPatientDate = patVo.m_dtInHospital; pVo.m_datInPatientDate = patVo.m_dtInHospital; pVo.m_intInPatientCount = 1; pVo.m_strAge = patVo.m_strAge; pVo.m_strBedID = patVo.m_strBedID; pVo.m_strBedName = patVo.m_strBedName; pVo.m_strDaptName = patVo.m_strDeptName; pVo.m_strDeptID = patVo.m_strDeptID; pVo.m_strDeptName = patVo.m_strDeptName; pVo.m_strEmrInPatientID = patVo.m_strInHospitalNo; pVo.m_strInPatientID = patVo.m_strInHospitalNo; pVo.m_strName = patVo.m_strPatientName; pVo.m_strPatientCardNO = patVo.m_strPATIENTCARDID_CHR; pVo.m_strPatientID = patVo.m_strPatientID; pVo.m_strPatientName = patVo.m_strPatientName; pVo.m_strRegisterID = patVo.m_strRegisterID; pVo.m_strSex = patVo.m_strSex; #endregion operation.m_objRequisition = prtVo; operation.m_objPatient = pVo; operation.m_objPatient.m_strDaptName = patVo.m_strDeptName; print.m_mthPrintSingle(operation); print.isPrintLandscape = true; }
/// <summary> /// Confirm /// </summary> void Confirm() { Dictionary <string, string> dicData = new Dictionary <string, string>(); DataRow dr = null; if (this.dtpOpDate.Tag != null) { dr = this.dtpOpDate.Tag as DataRow; dicData.Add("AnaId", dr["anaid_int"].ToString()); dicData.Add("OpenDate", dr["opendate_dat"].ToString()); dicData.Add("SignSequence", dr["signsequence_int"].ToString()); dicData.Add("Status", "1"); } else { MessageBox.Show("手术申请还未保存,不能审核。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } string confirmerID = string.Empty; string confirmerName = string.Empty; if (clsPublic.m_dlgConfirm(out confirmerID, out confirmerName) != DialogResult.Yes) { return; } dicData.Add("OpDate", this.dtpOpDate.Value.ToString()); dicData.Add("NoticeDate", this.lblNoticeDate.Text); dicData.Add("Diag", this.txtDiag.Text.Trim()); dicData.Add("LtStr", this.txtLt.Text.Trim()); dicData.Add("LtFlag", this.chkLt.Checked ? "1" : "0"); if (this.cboOpLocation.SelectedIndex == 0) { dicData.Add("OpLocation", "0001"); } else if (this.cboOpLocation.SelectedIndex == 1) { dicData.Add("OpLocation", "0002"); } else { dicData.Add("OpLocation", ""); } dicData.Add("OpType", this.cboOpType.Text); dicData.Add("OpName", this.txtOpName.Text.Trim()); dicData.Add("AnaType", this.cboAnaType.Text); dicData.Add("Weight", this.txtWeight.Text); dicData.Add("OpPart", this.txtOpPart.Text); dicData.Add("OpLevel", this.cboOpLevel.Text); dicData.Add("Isolation", this.cboIsolation.SelectedIndex.ToString()); dicData.Add("Wjop", this.cboWjop.SelectedIndex.ToString()); dicData.Add("Zqtys", this.cboZqtys.SelectedIndex.ToString()); dicData.Add("主刀医师", this.txtDoctMain.Text); dicData.Add("一助", this.txtDoctAss1.Text); dicData.Add("二助", this.txtDoctAss2.Text); dicData.Add("三助", this.txtDoctAss3.Text); clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject(); DataTable dtSign = svc.GetOpRecordSign(Convert.ToDecimal(dr["signsequence_int"])); if (dtSign != null && dtSign.Rows.Count > 0) { foreach (DataRow dr2 in dtSign.Rows) { if (dr2["tag_chr"].ToString().Trim() == "开单医师") { dicData.Add("开单医师", dr2["employeeid_chr"].ToString().Trim() + "|" + dr2["employeename_chr"].ToString().Trim()); } else if (dr2["tag_chr"].ToString().Trim() == "主管医师") { dicData.Add("主管医师", dr2["employeeid_chr"].ToString().Trim() + "|" + dr2["employeename_chr"].ToString().Trim()); } } } if (dicData.ContainsKey("开单医师") == false) { dicData.Add("开单医师", LoginInfo.m_strEmpID + "|" + LoginInfo.m_strEmpName); } if (dicData.ContainsKey("主管医师") == false) { dicData.Add("主管医师", patVo.m_strDOCTORID_CHR + "|" + patVo.m_strDOCTOR_VCHR); } dicData.Add("开单医师ID", dr["createuserid_chr"].ToString()); dicData.Add("开单科室ID", dr["deptid_chr"].ToString()); dicData.Add("DoctVisit", this.txtDoctVisit.Text.Trim()); dicData.Add("Comment", this.txtComment.Text.Trim()); // 审批医师 dicData.Add("审批医师", confirmerID + "|" + confirmerName); dicData.Add("审批医师ID", confirmerID); try { decimal anaId = 0; DateTime openDate = DateTime.Now; this.Cursor = Cursors.WaitCursor; int ret = svc.SaveOpApply(patVo, dicData, out anaId, out openDate, false); svc = null; if (ret > 0) { MessageBox.Show("审批成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); LoadData(anaId, openDate); } else { MessageBox.Show("审批失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch (Exception ex) { MessageBox.Show(ex.Message, "审批异常", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { this.Cursor = Cursors.Default; } }
/// <summary> /// Save /// </summary> void Save() { Dictionary <string, string> dicData = new Dictionary <string, string>(); dicData.Add("OpDate", this.dtpOpDate.Value.ToString()); dicData.Add("NoticeDate", this.lblNoticeDate.Text); dicData.Add("Diag", this.txtDiag.Text.Trim()); dicData.Add("LtStr", this.txtLt.Text.Trim()); dicData.Add("LtFlag", this.chkLt.Checked ? "1" : "0"); if (this.cboOpLocation.SelectedIndex == 0) { dicData.Add("OpLocation", "0001"); } else if (this.cboOpLocation.SelectedIndex == 1) { dicData.Add("OpLocation", "0002"); } else { dicData.Add("OpLocation", ""); } dicData.Add("OpType", this.cboOpType.Text); dicData.Add("OpName", this.txtOpName.Text.Trim()); dicData.Add("AnaType", this.cboAnaType.Text); dicData.Add("Weight", this.txtWeight.Text); dicData.Add("OpPart", this.txtOpPart.Text); dicData.Add("OpLevel", this.cboOpLevel.Text); dicData.Add("Isolation", this.cboIsolation.SelectedIndex.ToString()); dicData.Add("Wjop", this.cboWjop.SelectedIndex.ToString()); dicData.Add("Zqtys", this.cboZqtys.SelectedIndex.ToString()); dicData.Add("主刀医师", this.txtDoctMain.Text); dicData.Add("一助", this.txtDoctAss1.Text); dicData.Add("二助", this.txtDoctAss2.Text); dicData.Add("三助", this.txtDoctAss3.Text); dicData.Add("审批医师", ""); dicData.Add("开单医师", LoginInfo.m_strEmpID + "|" + LoginInfo.m_strEmpName); dicData.Add("主管医师", patVo.m_strDOCTORID_CHR + "|" + patVo.m_strDOCTOR_VCHR); dicData.Add("开单医师ID", LoginInfo.m_strEmpID); dicData.Add("审批医师ID", ""); dicData.Add("开单科室ID", LoginInfo.m_strDepartmentID); dicData.Add("DoctVisit", this.txtDoctVisit.Text.Trim()); dicData.Add("Comment", this.txtComment.Text.Trim()); if (dicData["OpType"] == string.Empty) { MessageBox.Show("手术类型不能为空", "", MessageBoxButtons.OK, MessageBoxIcon.Information); this.cboOpType.Focus(); return; } if (dicData["OpLocation"] == string.Empty) { MessageBox.Show("手术地点不能为空", "", MessageBoxButtons.OK, MessageBoxIcon.Information); this.cboOpLocation.Focus(); return; } if (dicData["OpName"] == string.Empty) { MessageBox.Show("手术名称不能为空", "", MessageBoxButtons.OK, MessageBoxIcon.Information); this.txtOpName.Focus(); return; } if (dicData["主刀医师"] == string.Empty) { MessageBox.Show("主刀医师不能为空", "", MessageBoxButtons.OK, MessageBoxIcon.Information); this.txtDoctMain.Focus(); return; } bool isNew = false; if (this.dtpOpDate.Tag != null) { DataRow dr = this.dtpOpDate.Tag as DataRow; dicData.Add("AnaId", dr["anaid_int"].ToString()); dicData.Add("OpenDate", dr["opendate_dat"].ToString()); dicData.Add("SignSequence", dr["signsequence_int"].ToString()); dicData.Add("Status", dr["status_int"].ToString()); } else { dicData.Add("AnaId", ""); dicData.Add("OpenDate", ""); dicData.Add("SignSequence", ""); dicData.Add("Status", "0"); isNew = true; } try { decimal anaId = 0; DateTime openDate = DateTime.Now; this.Cursor = Cursors.WaitCursor; clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject(); int ret = svc.SaveOpApply(patVo, dicData, out anaId, out openDate, false); svc = null; if (ret > 0) { MessageBox.Show("保存成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); if (isNew) { this.GetHistory(); LoadData(anaId, openDate); } } else { MessageBox.Show("保存失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch (Exception ex) { MessageBox.Show(ex.Message, "保存异常", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { this.Cursor = Cursors.Default; } }
private void txtOpName_Leave(object sender, EventArgs e) { string opName = this.txtOpName.Text.Trim(); if (opName != string.Empty && this.isStepControl) { clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject(); DataTable dt = svc.GetOpInfo(opName); if (dt != null && dt.Rows.Count > 0) { DataRow dr = dt.Rows[0]; string fOpjb = dr["fopjb"].ToString().Trim(); string rank = this.LoginInfo.m_strTechnicalRank; if (string.IsNullOrEmpty(rank)) { this.txtOpName.Text = string.Empty; this.txtOpName.Focus(); MessageBox.Show("很抱歉!您当前在系统中未设置职称,不能开手术申请。", "", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { // '主任医师', '副主任医师', '主治医师', '医师' rank = rank.Trim(); if (rank == "主任医师") { } else if (rank == "副主任医师") { if (fOpjb == "四级") { this.txtOpName.Text = string.Empty; this.txtOpName.Focus(); MessageBox.Show("很抱歉!您只能申请一、二、三级手术.", "", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } else if (rank == "主治医师") { if (fOpjb == "四级" || fOpjb == "三级") { this.txtOpName.Text = string.Empty; this.txtOpName.Focus(); MessageBox.Show("很抱歉!您只能申请一、二级手术.", "", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } else if (rank == "医师" || rank == "住院医师") { if (fOpjb != "一级") { this.txtOpName.Text = string.Empty; this.txtOpName.Focus(); MessageBox.Show("很抱歉!您只能申请一级手术.", "", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } else { this.txtOpName.Text = string.Empty; this.txtOpName.Focus(); MessageBox.Show("很抱歉!您不是医师,不能申请手术。", "", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (fOpjb == "一级") { this.cboOpLevel.Text = "I"; } else if (fOpjb == "二级") { this.cboOpLevel.Text = "II"; } else if (fOpjb == "三级") { this.cboOpLevel.Text = "III"; } else if (fOpjb == "四级") { this.cboOpLevel.Text = "IV"; } this.cboOpLevel.Enabled = false; } } else { this.txtOpName.Text = string.Empty; this.txtOpName.Focus(); MessageBox.Show("输入的手术名称不在广东省手术目录中.", "", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } else { this.cboOpLevel.Enabled = true; } }