/// <summary> /// 将commonNoteEntity转成InCommonNoteEnmtity,并保存 /// </summary> /// <param name="commonNoteEntity"></param> /// <returns></returns> private InCommonNoteEnmtity ConverBycommonNote(CommonNoteEntity commonNoteEntity) { try { CommonNoteBiz commonNoteBiz = new DrectSoft.Core.CommonTableConfig.CommonNoteBiz(m_app); commonNoteEntity = commonNoteBiz.GetDetailCommonNote(commonNoteEntity.CommonNoteFlow); InCommonNoteEnmtity inCommonNote = InCommonNoteBiz.ConvertCommonToInCommon(commonNoteEntity); InCommonNoteBiz icombiz = new DrectSoft.Core.CommonTableConfig.CommonNoteUse.InCommonNoteBiz(m_app); DataTable inpatientDt = icombiz.GetInpatient(m_noofinpat); inCommonNote.CurrDepartID = inpatientDt.Rows[0]["OUTHOSDEPT"].ToString(); inCommonNote.CurrDepartName = inpatientDt.Rows[0]["DEPARTNAME"].ToString(); inCommonNote.CurrWardID = inpatientDt.Rows[0]["OUTHOSWARD"].ToString(); inCommonNote.CurrWardName = inpatientDt.Rows[0]["WARDNAME"].ToString(); inCommonNote.NoofInpatient = m_noofinpat; inCommonNote.InPatientName = inpatientDt.Rows[0]["NAME"].ToString(); string message = ""; bool saveResult = icombiz.SaveInCommomNoteAll(inCommonNote, ref message); if (saveResult) { return(inCommonNote); } else { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("创建单据失败"); return(null); } } catch (Exception ex) { throw ex; } }
/// <summary> /// 记录单整体录入单项点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void barButtonItem_ItemClick(object sender, ItemClickEventArgs e) { try { BarButtonItem barButtonItem = (e.Item as BarButtonItem); if (barButtonItem == null || barButtonItem.Tag == null || !(barButtonItem.Tag is CommonNoteEntity)) { return; } CommonNoteEntity commonNoteEntity = barButtonItem.Tag as CommonNoteEntity; XtraTabPage xtraTabPage = HasTabPage("PL" + commonNoteEntity.CommonNoteFlow); if (xtraTabPage == null) { xtraTabPage = new XtraTabPage(); xtraTabPage.Name = "PL" + commonNoteEntity.CommonNoteFlow; xtraTabPage.Text = commonNoteEntity.CommonNoteName + "多人录入"; NurseJLDForm nurseJLDForm = new ThreeRecordAll.NurseJLDForm(m_app, commonNoteEntity); nurseJLDForm.TopLevel = false; nurseJLDForm.FormBorderStyle = FormBorderStyle.None; nurseJLDForm.Dock = DockStyle.Fill; nurseJLDForm.Show(); xtraTabPage.Controls.Add(nurseJLDForm); tabControlSCD.TabPages.Add(xtraTabPage); } tabControlSCD.SelectedTabPage = xtraTabPage; } catch (Exception ex) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.StackTrace); } }
/// <summary> /// 测试方法 /// </summary> private void Test() { string message = ""; CommonNoteBiz cbiz = new CommonNoteBiz(m_app); m_commonNoteEntity = cbiz.GetDetailCommonNote("f5d1c558-df2a-4ac5-8d1d-6ef3ccaef5e7"); InCommonNoteBiz icombiz = new InCommonNoteBiz(m_app); List <InCommonNoteEnmtity> InCommonNoteList = icombiz.GetSimInCommonNote("1333"); if (InCommonNoteList == null || InCommonNoteList.Count == 0) { m_inCommonNote = InCommonNoteBiz.ConvertCommonToInCommon(m_commonNoteEntity); DataTable inpatientDt = icombiz.GetInpatient("1333"); m_inCommonNote.CurrDepartID = inpatientDt.Rows[0]["OUTHOSDEPT"].ToString(); m_inCommonNote.CurrDepartName = inpatientDt.Rows[0]["DEPARTNAME"].ToString(); m_inCommonNote.CurrWardID = inpatientDt.Rows[0]["OUTHOSWARD"].ToString(); m_inCommonNote.CurrWardName = inpatientDt.Rows[0]["WARDNAME"].ToString(); m_inCommonNote.NoofInpatient = "1333"; m_inCommonNote.InPatientName = inpatientDt.Rows[0]["NAME"].ToString(); bool saveResult = icombiz.SaveInCommomNoteAll(m_inCommonNote, ref message); } else { m_inCommonNote = InCommonNoteList[0]; } }
/// <summary> /// 打开选中单据的批量录入 /// </summary> /// <param name="commonNoteEntity"></param> private void OpenHLDPL(CommonNoteEntity commonNoteEntity) { try { if (commonNoteEntity == null) { return; } XtraTabPage xtraTabPage = HasTabPage("KS" + commonNoteEntity.CommonNoteFlow); if (xtraTabPage == null) { xtraTabPage = new XtraTabPage(); xtraTabPage.Name = "KS" + commonNoteEntity.CommonNoteFlow; xtraTabPage.Text = commonNoteEntity.CommonNoteName + "多人录入"; if (commonNoteEntity.CommonNote_TabList == null) { CommonNoteBiz commonNoteBiz = new CommonNoteBiz(m_app); commonNoteEntity = commonNoteBiz.GetDetailCommonNote(commonNoteEntity.CommonNoteFlow); } DayListForm dayListForm = new DayListForm(commonNoteEntity, m_app); dayListForm.TopLevel = false; dayListForm.FormBorderStyle = FormBorderStyle.None; dayListForm.Dock = DockStyle.Fill; dayListForm.Show(); xtraTabPage.Controls.Add(dayListForm); tabControlSCD.TabPages.Add(xtraTabPage); } tabControlSCD.SelectedTabPage = xtraTabPage; } catch (Exception ex) { throw ex; } }
public ChangeNameForm(CommonNoteEntity commonNoteEntity) { try { InitializeComponent(); m_CommonNoteEntity = commonNoteEntity; txtInCommonName.Text = m_CommonNoteEntity.CommonNoteName; } catch (Exception ex) { throw ex; } }
private void GetCommonNote() { try { SelectCommonNoteEntity = gridView1.GetFocusedRow() as CommonNoteEntity; if (SelectCommonNoteEntity != null) { this.DialogResult = DialogResult.OK; } } catch (Exception ex) { throw ex; } }
DataTable dtInpatient; //科室病区病人 public AddFrom(CommonNoteEntity commonNoteEntity, IEmrHost app) { this.m_CommonNoteEntity = commonNoteEntity; this.m_app = app; this.m_CommonNoteBiz = new CommonNoteBiz(this.m_app); this.m_InCommonNoteBiz = new InCommonNoteBiz(this.m_app); InitializeComponent(); #region ---已注销 by xlb 2013.02.04-------------------- //if (m_CommonNoteEntity.CommonNote_TabList == null) //{ // CommonNoteBiz commonNoteBiz = new DrectSoft.Core.CommonTableConfig.CommonNoteBiz(m_app); // m_CommonNoteEntity = commonNoteBiz.GetDetailCommonNote(m_CommonNoteEntity.CommonNoteFlow); //} #endregion dateTimeAdd.DateTime = DateTime.Now; }
public UCInCommonNote(IYidanEmrHost app, CommonNoteEntity commonNoteEntity, InCommonNoteEnmtity inCommonNote, bool canEdit) { try { m_app = app; m_commonNoteEntity = commonNoteEntity; m_inCommonNote = inCommonNote; m_canEdit = canEdit; //Test(); InitializeComponent(); InitForm(); } catch (Exception ex) { YiDanCommon.Ctrs.DLG.YiDanMessageBox.Show(ex.StackTrace); } }
Dictionary <string, List <InCommonNoteItemEntity> > dicitemListDel = new Dictionary <string, List <InCommonNoteItemEntity> >(); //删除的数据 /// <summary> /// 构造方法 /// edit by xlb 2013-02-01 /// 加上了等待窗 /// </summary> /// <param name="commonNoteEntity"></param> /// <param name="app"></param> public DayListForm(CommonNoteEntity commonNoteEntity, IEmrHost app) { m_WaitDialog = new WaitDialogForm("正在打开" + "" + commonNoteEntity.CommonNoteName + "", "请稍后..."); this.m_CommonNoteEntity = commonNoteEntity; this.m_app = app; this.m_CommonNoteBiz = new CommonNoteBiz(this.m_app); this.m_InCommonNoteBiz = new InCommonNoteBiz(this.m_app); InitializeComponent(); #region ----------------已注销 by xlb 2013.02.04-------- if (m_CommonNoteEntity.CommonNote_TabList == null) { CommonNoteBiz commonNoteBiz = new DrectSoft.Core.CommonTableConfig.CommonNoteBiz(m_app); m_CommonNoteEntity = commonNoteBiz.GetDetailCommonNote(m_CommonNoteEntity.CommonNoteFlow); } #endregion dateEdit1.DateTime = DateTime.Now; }
public UCInCommonNote(IEmrHost app, CommonNoteEntity commonNoteEntity, InCommonNoteEnmtity inCommonNote, bool canEdit) { try { m_app = app; m_commonNoteEntity = commonNoteEntity; m_inCommonNote = inCommonNote; m_canEdit = canEdit; //Test(); InitializeComponent(); GetBiaoDianAndFuHao(); InitForm(); } catch (Exception ex) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.StackTrace); } }
/// <summary> /// 护理单批量录入 对于单个单据 暂不用 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void barButtonItem_ItemClickKS(object sender, ItemClickEventArgs e) { try { BarButtonItem barButtonItem = (e.Item as BarButtonItem); if (barButtonItem == null || barButtonItem.Tag == null || !(barButtonItem.Tag is CommonNoteEntity)) { return; } CommonNoteEntity commonNoteEntity = barButtonItem.Tag as CommonNoteEntity; //commonNoteEntity = OpenHLDPL(commonNoteEntity); } catch (Exception ex) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.StackTrace); } }
public InCommListForm(List <InCommonNoteEnmtity> inCommonNoteList, IEmrHost app, string noofInpat, CommonNoteEntity commonNoteEntity) { try { InitializeComponent(); m_app = app; m_InCommonNoteList = inCommonNoteList; m_noofinpat = noofInpat; m_commonNoteEntity = commonNoteEntity; DataTable dt = SetCommonToDataTable(m_InCommonNoteList); gcIncommonList.DataSource = dt; if (inCommonNoteList != null && inCommonNoteList.Count > 0) { this.Text = inCommonNoteList[0].InPatientName + "已有单据编辑"; } } catch (Exception ex) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.StackTrace); } }
/// <summary> /// 修改单据名 /// edit by xlb /// 2013-01-31 /// </summary> private void commit() { try { SelectCommonNoteEntity = gridView1.GetFocusedRow() as CommonNoteEntity; if (SelectCommonNoteEntity != null) { ChangeNameForm ChangeNameForm = new ChangeNameForm(SelectCommonNoteEntity); DialogResult dResult = ChangeNameForm.ShowDialog(); if (dResult == DialogResult.OK) { this.DialogResult = DialogResult.OK; //选择的模板对象名改为修改后的名称 SelectCommonNoteEntity.CommonNoteName = ChangeNameForm.m_CommonNoteEntity.CommonNoteName; } } } catch (Exception ex) { throw ex; } }
/// <summary> /// 将CommonNoeEntity->InCommonNoteEnmtity; /// xlb 2013-01-19 /// </summary> /// <param name="commonNote"></param> /// <returns></returns> private InCommonNoteEnmtity ConvertToByCommonNote(CommonNoteEntity commonNote, InPatientSim inPatient) { try { //用来接收选择的模板的新模板名称 string commonNoteNames = commonNote.CommonNoteName == null ? "" : commonNote.CommonNoteName; CommonNoteBiz commonNoteBiz = new CommonNoteBiz(m_app); commonNote = commonNoteBiz.GetDetailCommonNote(commonNote.CommonNoteFlow); commonNote.CommonNoteName = commonNoteNames;//模板名称修改 InCommonNoteEnmtity inCommonNote = InCommonNoteBiz.ConvertCommonToInCommon(commonNote); InCommonNoteBiz incommonNoteBiz = new InCommonNoteBiz(m_app); DataTable dtPatient = incommonNoteBiz.GetInpatient(inPatient.NoofInpat.ToString()); inCommonNote.CurrDepartID = dtPatient.Rows[0]["OUTHOSDEPT"].ToString(); inCommonNote.CurrDepartName = dtPatient.Rows[0]["DEPARTNAME"].ToString(); inCommonNote.CurrWardID = dtPatient.Rows[0]["OUTHOSWARD"].ToString(); inCommonNote.CurrWardName = dtPatient.Rows[0]["WARDNAME"].ToString(); inCommonNote.NoofInpatient = inPatient.NoofInpat.ToString(); inCommonNote.InPatientName = dtPatient.Rows[0]["NAME"].ToString(); inCommonNote.CreateDateTime = DateTime.Now.ToString(); inCommonNote.Valide = "1"; string message = ""; bool saveResult = incommonNoteBiz.SaveInCommomNoteAll(inCommonNote, ref message); if (saveResult) { return(inCommonNote); } else { MessageBox.Show("创建单据失败"); return(null); } } catch (Exception ex) { throw ex; } }
public NurseJLDForm(IEmrHost app, CommonNoteEntity commonNoteEntity) { try { this.m_app = app; this.m_commonNoteEntity = commonNoteEntity; InitializeComponent(); if (m_commonNoteEntity.CommonNote_TabList == null) { CommonNoteBiz commonNoteBiz = new DrectSoft.Core.CommonTableConfig.CommonNoteBiz(m_app); m_commonNoteEntity = commonNoteBiz.GetDetailCommonNote(m_commonNoteEntity.CommonNoteFlow); } //InitInpatient();//xlb InitPatient(); InitTool(); //SetDockPanelHidden(); } catch (Exception ex) { MyMessageBox.Show(1, ex); } }