private void AnesEventShow(bool isAddEvent, string eventName) { panelControlEvent.Controls.Clear(); if (_anesthesiaEventsEditor == null) { _anesthesiaEventsEditor = new AnesthesiaEventsEditor(ExtendApplicationContext.Current.PatientInformationExtend, ApplicationConfiguration.IsPACUProgram ? "1" : "0"); _anesthesiaEventsEditor.EventSaveClicked += new EventHandler(SaveClicked); _anesthesiaEventsEditor.Dock = DockStyle.Fill; } else { _anesthesiaEventsEditor.RefAnesthesiaEvent(ExtendApplicationContext.Current.PatientInformationExtend, ApplicationConfiguration.IsPACUProgram ? "1" : "0"); } panelControlEvent.Controls.Add(_anesthesiaEventsEditor); _anesthesiaEventsEditor.BringToFront(); panelControlEvent.Dock = DockStyle.Fill; AccessOperEvent(); AnesEventSelector(); // panelControlEvent.Controls.Add(panelControlSelector); }
public InOperation(MED_PATIENT_CARD patientInfo, decimal eventNo, bool showAnesAndOper) { Caption = ViewNames.InOperation; if (eventNo == 1) { Caption = ViewNames.PACUInOperation; } DevExpress.XtraEditors.SplitContainerControl splitter = new DevExpress.XtraEditors.SplitContainerControl(); splitter.Dock = DockStyle.Fill; Controls.Add(splitter); splitter.Horizontal = false; splitter.Panel2.MinSize = 150; splitter.Panel1.MinSize = 200; splitter.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2; Panel pnlBody = new Panel(); pnlBody.Dock = DockStyle.Fill; _anesthesiaEventsEditor = new AnesthesiaEventsEditor(patientInfo, eventNo.ToString()); pnlBody.Controls.Add(_anesthesiaEventsEditor); _anesthesiaEventsEditor.Dock = DockStyle.Fill; _anesthesiaEventsEditor.BringToFront(); splitter.Panel1.Controls.Add(pnlBody); _patMonitorEditor = new PatMonitorEditor(patientInfo.PATIENT_ID, patientInfo.VISIT_ID, patientInfo.OPER_ID, eventNo.ToString()); _patMonitorEditor.Dock = DockStyle.Fill; splitter.SplitterPosition = 280; splitter.Panel2.Controls.Add(_patMonitorEditor); if (ExtendApplicationContext.Current.AppType == ApplicationType.PACU) { if (_anesthesiaEventsEditor != null) { _anesthesiaEventsEditor.SetReadOnly(false); } if (_patMonitorEditor != null) { _patMonitorEditor.SetReadOnly(false); } } else if (ExtendApplicationContext.Current.AppType == ApplicationType.Anesthesia) { if (!AccessControl.CheckModifyRight(PermissionContext.ANESRECORDOPER) || !AccessControl.CheckModifyRightForOperator("麻醉记录单"))//ApplicationConfiguration.AnesRecordOper)//麻醉数据修改操作权限控制 { if (_anesthesiaEventsEditor != null) { _anesthesiaEventsEditor.SetReadOnly(true); } } else { if (_anesthesiaEventsEditor != null) { _anesthesiaEventsEditor.SetReadOnly(false); } } if (!AccessControl.CheckModifyRight(PermissionContext.MonitorDataEdit) || !AccessControl.CheckModifyRightForOperator("麻醉记录单")) { if (_patMonitorEditor != null) { _patMonitorEditor.SetReadOnly(true); } } else { if (_patMonitorEditor != null) { _patMonitorEditor.SetReadOnly(false); } } } //只有PACU时判断 if (ExtendApplicationContext.Current.EventNo == "1") { if (!ExtendApplicationContext.Current.CustomSettingContext.IsShowAnesthesiaEventsEditor) { SetAnesthesiaEventsEditorVisible(false); splitter.Panel1.MinSize = 0; splitter.Panel2.MinSize = (int)(Screen.PrimaryScreen.Bounds.Height); splitter.Panel1.Height = 0; splitter.SplitterPosition = 0; } if (!ExtendApplicationContext.Current.CustomSettingContext.IsShowPatMonitorEditor) { _patMonitorEditor.Visible = false; splitter.Panel2.MinSize = 0; splitter.Panel1.MinSize = (int)(Screen.PrimaryScreen.Bounds.Height); splitter.Panel2.Height = 0; splitter.SplitterPosition = (int)(Screen.PrimaryScreen.Bounds.Height); } } }