public override bool Save() { bool result = false; if (_anesthesiaEventsEditor != null) { result = _anesthesiaEventsEditor.Save(); } if (_patMonitorEditor != null && _patMonitorEditor.Save()) { result = true; } return(result); }
public void AddPatientView() { if (_anesthesiaEventsEditor != null && _anesthesiaEventsEditor.IsDirty) { if (MessageBoxFormPC.Show("是否保存麻醉事件?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { _anesthesiaEventsEditor.Save(); } } // Application.DoEvents(); panelProcess.Visible = false; if (ApplicationConfiguration.IsPACUProgram) { panelAnesEvent.Text = "复苏事件"; lblDocTtile.Text = "复苏记录单"; AddViewToWorkSpace(_patienViewPACU, "PatientListViewPACU"); } else { panelAnesEvent.Text = "麻醉事件"; lblDocTtile.Text = "麻醉记录单"; AddViewToWorkSpace(_patientView, "PatientListView"); } }
private bool CheckSave() { if (_anesthesiaEventsEditor != null && _anesthesiaEventsEditor.IsDirty) { DialogResult result = Dialog.MessageBox("输入未保存,现在保存吗?", "提示", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); Application.DoEvents(); if (result == DialogResult.No) { return(true); } else if (result == DialogResult.Cancel) { return(false); } else { return(_anesthesiaEventsEditor.Save()); } } return(true); }