private void tsrbtnSave_Click(object sender, EventArgs e) { try { if (CheckInput() == true) { if (_currentState == ADD) { string[] pywbcodeName = new string[2]; string[] pywbcodeChemName = new string[2]; pywbcodeName = PublicStaticFun.GetPyWbCode(_currentSpec.Name); pywbcodeChemName = PublicStaticFun.GetPyWbCode(_currentSpec.ChemName); DrugBaseDataBll.AddDgSpec(_currentSpec, pywbcodeName, pywbcodeChemName); TextBoxEnable(false, false); MessageBox.Show("保存成功"); } else if (_currentState == UPDATE) { DrugBaseDataBll.UpdateDgSpec(_currentSpec); TextBoxEnable(false, true); MessageBox.Show("更新成功"); } _currentState = NORMAL; ButtonEnable(); } } catch (Exception error) { MessageBox.Show(error.Message); } }
// 保存 private void btnSave_Click(object sender, EventArgs e) { if (dtgrdModel == null || dtgrdModel.Rows.Count == 0) { return; } dtgrdModel.EndEdit(); this.chkEdit.Checked = false; try { this.Cursor = PublicStaticFun.WaitCursor(); HIS.ZYDoc_BLL.WrongDecline wrong = Controller.SaveModelList(); if (wrong.err != "0") { MessageBox.Show(wrong.err); this.dtgrdModel.CurrentCell = dtgrdModel[wrong.colid, wrong.rowid]; this.Cursor = Cursors.Default; } else { MessageBox.Show("保存成功"); Controller.GetModelData(); this.Cursor = Cursors.Default; this.setPlace(); } } catch (Exception err) { MessageBox.Show(err.Message); } finally { this.Cursor = Cursors.Default; } }
private void tsrbtnSave_Click(object sender, EventArgs e) { try { if (CheckInput() == true) { _currentSupport.PYM = PublicStaticFun.GetPyWbCode(_currentSupport.Name)[0].ToString(); _currentSupport.WBM = PublicStaticFun.GetPyWbCode(_currentSupport.Name)[1].ToString(); if (_currentState == ADD) { DrugBaseDataBll.AddSupport(_currentSupport); DrugBaseDataBll.AddSupport(_supportInfo, _currentSupport); EnableTextBox(false); MessageBox.Show("添加成功"); } else if (_currentState == UPDATE) { DrugBaseDataBll.UpdateSupport(_currentSupport); DrugBaseDataBll.UpdateSupport(_currentSupport, _supportInfo, dgrdSupport.CurrentCell.RowIndex); EnableTextBox(false); MessageBox.Show("更新成功"); } tsrSupport.Focus(); tsrbtnAdd.Select(); _currentState = NORMAL; EnableButton(); } } catch (Exception error) { MessageBox.Show(error.Message); } }
//绑定ZYPatList对象==修改病人信息 和 入院病人信息 都是同一绑定 //CurrDeptCode属性的写入有所不同 private void BindZYPatList() { //Entity //int Length = Encoding.Default.GetBytes(this.tbpatName.Text.Trim()).Length; _zyPatlist.patientInfo.PatName = GWIString.FilterSpecial(this.tbpatName.Text); _zyPatlist.patientInfo.PatSex = this.cbSex.Text; _zyPatlist.patientInfo.PYM = PublicStaticFun.GetPyWbCode(this.tbpatName.Text)[0].ToString(); _zyPatlist.patientInfo.WBM = PublicStaticFun.GetPyWbCode(this.tbpatName.Text)[1].ToString(); //_patientinfo.CureNo = this.tbInpatNo.Text; //_patientinfo.CureNum = 1; _zyPatlist.patientInfo.PatNumber = GWIString.FilterSpecial(this.tBpatNumber.Text); _zyPatlist.patientInfo.PatBriDate = this.dtpBridate.Value; _zyPatlist.patientInfo.PatGroup = GWIString.FilterSpecial(this.tbGroup.Text); _zyPatlist.patientInfo.PatTEL = GWIString.FilterSpecial(this.tbTell.Text); _zyPatlist.patientInfo.PatAddress = GWIString.FilterSpecial(this.tbAddress.Text); _zyPatlist.patientInfo.PatCaseNo = GWIString.FilterSpecial(this.tbCaseNo.Text); _zyPatlist.patientInfo.MediCard = GWIString.FilterSpecial(this.tbWorkNo.Text); _zyPatlist.patientInfo.PATJOB = GWIString.FilterSpecial(this.tbJob.Text); _zyPatlist.patientInfo.ACCOUNTTYPE = this.cbAccountType.Text.ToString();//update zh 090616 _zyPatlist.patientInfo.LinkMan = this.tblinkman.Text; _zyPatlist.patientInfo.LinkTel = this.tblinktel.Text; _zyPatlist.patientInfo.LinkAddress = this.tblinkaddress.Text; _zyPatlist.PatientCode = this.cbAccountType.SelectedValue.ToString();//add zh 090616 //zy_patlist.CureNo = this.tbInpatNo.Text; _zyPatlist.CureDate = this.dtpregdate.Value; _zyPatlist.DiseaseCode = this.tbdiag.MemberValue == null ? "" : this.tbdiag.MemberValue.ToString();//? _zyPatlist.DiseaseName = Convert.ToString(GWIString.FilterSpecial(this.tbdiag.Text) + "|" + this.tb_diag_bk.Text.Trim()).Length > 20 ? Convert.ToString(GWIString.FilterSpecial(this.tbdiag.Text) + "|" + this.tb_diag_bk.Text.Trim()).Substring(0, 20) : Convert.ToString(GWIString.FilterSpecial(this.tbdiag.Text) + "|" + this.tb_diag_bk.Text.Trim()); _zyPatlist.CureDeptCode = this.tbregDeptCode.MemberValue == null ? "" : this.tbregDeptCode.MemberValue.ToString();//? //_zyPatlist.CurrDeptCode = this.tbregDeptCode.MemberValue == null ? "" : this.tbregDeptCode.MemberValue.ToString();// add zenghao 20100714 //zy_patlist.CurrDeptCode = ""; _zyPatlist.BedCode = GWIString.FilterSpecial(this.tbBedNo.Text); //? _zyPatlist.CureState = this.cbCureState.Text; //? //经管 //推荐人=门诊医生 _zyPatlist.OriginDocCode = this.tbCureDocCode.MemberValue == null ? "" : this.tbCureDocCode.MemberValue.ToString(); //?; _zyPatlist.OriginDeptCode = this.tbCureDocCode.Tag == null ? "" : this.tbCureDocCode.Tag.ToString(); //推荐科室 住院证得到 _zyPatlist.CurrDeptCode = this.tbOriginDept.MemberValue == null ? "" : this.tbOriginDept.MemberValue.ToString(); //主管科室 _zyPatlist.CureDocCode = this.tbOriginDoc.MemberValue == null ? "" : this.tbOriginDoc.MemberValue.ToString(); //?; _zyPatlist.MarkDate = XcDate.ServerDateTime; _zyPatlist.MarkEmpCode = _currentUser.EmployeeID.ToString(); //? _zyPatlist.DbName = this.txtDbName.Text; _zyPatlist.DbFee = Convert.ToDecimal(this.txtDbFee.Text); //病人类型修改后的状态 //if (zy_patlist.PatientInfo.ACCOUNTTYPE == "农合") //{ // zy_patlist.Nccm_NO = FrmNccm_NO; //} //else //{ // zy_patlist.Nccm_NO = ""; //} }
private void tsrbtnSave_Click(object sender, EventArgs e) { try { if (CheckInput() == true) { if (_currentState == ADD) { _currentByname.PYM = PublicStaticFun.GetPyWbCode(this.txtByname.Text)[0].ToString(); _currentByname.WBM = PublicStaticFun.GetPyWbCode(this.txtByname.Text)[1].ToString(); this.txtPYM.Text = _currentByname.PYM; this.txtWBM.Text = _currentByname.WBM; DrugBaseDataBll.AddDgByname(_currentByname); LoadData(); if (_bynameDt.Rows.Count > 0) { dgrdByName.CurrentCell = dgrdByName[0, _bynameDt.Rows.Count - 1]; } else { dgrdByName.CurrentCell = dgrdByName[0, 0]; } TextBoxEnable(false); MessageBox.Show("添加成功"); } else if (_currentState == UPDATE) { //_currentByname.PYM = PublicStaticFun.GetPyWbCode(this.txtByname.Text)[0].ToString(); //_currentByname.WBM = PublicStaticFun.GetPyWbCode(this.txtByname.Text)[1].ToString(); //this.txtPYM.Text = _currentByname.PYM; //this.txtWBM.Text = _currentByname.WBM; _currentByname.PYM = this.txtPYM.Text.Trim(); _currentByname.WBM = this.txtWBM.Text.Trim(); DrugBaseDataBll.UpdateByname(_currentByname); LoadData(); TextBoxEnable(false); MessageBox.Show("更新成功"); } _currentState = NORMAL; ButtonEnable(); TextBoxEnable(false); this.tsrDrugByName.Focus(); this.tsrbtnAdd.Select(); } } catch (Exception error) { MessageBox.Show(error.Message); } }
private void 医嘱录入ToolStripMenuItem_Click(object sender, EventArgs e) { if (this.listView1.FocusedItem == null && listView2.FocusedItem == null) { MessageBox.Show("没有选择病人"); return; } this.Cursor = PublicStaticFun.WaitCursor(); HIS_ZYDocManager.日常业务.BaseForm form = new BaseForm(patlist, _currentUser.UserID, _currentDept.DeptID); form.MdiParent = this.MdiParent; form.WindowState = FormWindowState.Maximized; ((GWMHIS.BussinessLogicLayer.Interfaces.IInvokForm) this.Parent.Parent.Parent).AddFormToTabPage(form); form.Show(); this.Cursor = Cursors.Default; }
private void btnRefreshBaseData_Click(object sender, EventArgs e) { try { Cursor = PublicStaticFun.WaitCursor( ); controller.ReloadData( ); } catch (Exception err) { MessageBox.Show(err.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { Cursor = Cursors.Default; } }
/// <summary> /// 选择病人头像事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void listView1_DoubleClick(object sender, EventArgs e) { if (listView1.FocusedItem == null && listView2.FocusedItem == null) { MessageBox.Show("请选择病人!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.tabPageControl1.SelectedIndex == 0) { patlist = (HIS.Model.ZY_PatList) this.listView1.FocusedItem.Tag; } else { patlist = (HIS.Model.ZY_PatList) this.listView2.FocusedItem.Tag; } this.Cursor = PublicStaticFun.WaitCursor(); HIS_ZYDocManager.日常业务.BaseForm form = new BaseForm(patlist, _currentUser.UserID, _currentDept.DeptID); form.MdiParent = this.MdiParent; form.WindowState = FormWindowState.Maximized; ((GWMHIS.BussinessLogicLayer.Interfaces.IInvokForm) this.Parent.Parent.Parent).AddFormToTabPage(form); form.Show(); this.Cursor = Cursors.Default; }
void OnOutlookBarItemClicked(OutlookBarBand band, OutlookBarItem item) { if (this.listView1.FocusedItem == null && listView2.FocusedItem == null && (item.Text == "医嘱管理" || item.Text == "检查申请" || item.Text == "检验申请" || item.Text == "治疗申请" || item.Text == "护理信息")) { MessageBox.Show("请选择病人!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } switch (item.Text) { case "医嘱管理": this.Cursor = PublicStaticFun.WaitCursor(); HIS_ZYDocManager.日常业务.BaseForm form = new BaseForm(patlist, _currentUser.UserID, _currentDept.DeptID); form.MdiParent = this.MdiParent; form.WindowState = FormWindowState.Maximized; ((GWMHIS.BussinessLogicLayer.Interfaces.IInvokForm) this.Parent.Parent.Parent).AddFormToTabPage(form); form.Show(); this.Cursor = Cursors.Default; break; case "手术申请": if (HIS.ZYDoc_BLL.PatInfo.PatOperation.NotCanUpdate(patlist)) //20100518.0.03 病人定义出院后,不能再进行手术申请 { MessageBox.Show("该病人已定义出院,不能再进行手术申请"); return; } FrmSsApply fss = new FrmSsApply(patlist, _currentUser.UserID, _currentDept.DeptID); fss.ShowDialog(); break; case "手术查询": FrmSsQuery fsq = new FrmSsQuery(); fsq.ShowDialog(); break; case "检验申请": FrmTestApply fta = new FrmTestApply(patlist, _currentUser.UserID, _currentDept.DeptID); fta.ShowDialog(); break; case "检查申请": FrmCheckApply fca = new FrmCheckApply(patlist, _currentUser.UserID, _currentDept.DeptID); fca.ShowDialog(); break; case "治疗申请": FrmCureApply fc = new FrmCureApply(patlist, _currentUser.UserID, _currentDept.DeptID); fc.ShowDialog(); break; case "住院病人信息统计": HIS_ZYDocManager.查询统计.FrmPatientInfo rpt = new HIS_ZYDocManager.查询统计.FrmPatientInfo(_currentUser.UserID, _currentDept.DeptID, this.Text); rpt.ShowDialog(); break; case "医生工作量统计": HIS_ZYDocManager.查询统计.FrmDocWorkQuery work = new HIS_ZYDocManager.查询统计.FrmDocWorkQuery(_currentUser.UserID, _currentDept.DeptID, ""); work.ShowDialog(); break; case "计算器": System.Diagnostics.Process.Start("calc.exe"); break; case "画笔": System.Diagnostics.Process.Start("mspaint.exe"); break; case "通讯簿": System.Diagnostics.Process.Start("wab.exe"); break; case "记事本": System.Diagnostics.Process.Start("notepad.exe"); break; case "写字板": System.Diagnostics.Process.Start("wordpad.exe"); break; case "图象处理": System.Diagnostics.Process.Start("kodakimg.exe"); break; default: break; } this.Cursor = System.Windows.Forms.Cursors.Arrow; }
//刷新选项卡 private void 刷新选项卡ToolStripMenuItem_Click(object sender, EventArgs e) { this.Cursor = PublicStaticFun.WaitCursor(); Controller.LoadINFO(); this.Cursor = Cursors.Default; }