private void InitialScreen() { this.ToolBarSwitch = "2122222222"; ConfigDTO = vmSys.GetSystemConfig(); bs2.DataSource = ConfigDTO; CtrlUtil.VisibleControls(OISDataInfo.UserInfomation.GROUP_ID == 1, gbSystem); }
public sp_SYS001_GetSystemConfig_Result GetSystemConfig() { try { using (OIS_SYSEntities ct = new OIS_SYSEntities()) { sp_SYS001_GetSystemConfig_Result result = ct.sp_SYS001_GetSystemConfig().FirstOrDefault(); return(result); } } catch (Exception ex) { throw ex; } }
public void SaveSystemConfig(sp_SYS001_GetSystemConfig_Result data) { try { using (OIS_SYSEntities ct = new OIS_SYSEntities()) using (TransactionScope trans = new TransactionScope()) { ct.sp_SYS001_SaveSystemConfig(data.IS_UPDATE_AUTOUPDATE, data.DEFAULT_REPORT_REGISTRATION_ID, data.DEFAULT_REPORT_LAB_SUPERVISOR_ID, data.REPORT_REV_WPL, data.DEFAULT_REPORT_WPA_REGISTRATION_ID, data.DEFAULT_REPORT_WPA_LAB_SUPERVISOR_ID, data.REPORT_REV_WPA, OISDataInfo.UserInfomation.USER_ID); trans.Complete(); } } catch (Exception ex) { throw ex; } }
public void SaveSystemConfig(sp_SYS001_GetSystemConfig_Result data) { service.SaveSystemConfig(data); }
private void RetriveData() { try { this.Cursor = Cursors.WaitCursor; systemConfigResult = vmSys.GetSystemConfig(); if (mode == ScreenMode.Add) { if (wpaResult == null) { wpaResult = new RPT002_WorkPlaceAirDTO(); wpaResult.IS_WA = true; wpaResult.IS_AWA = false; wpaResult.REPORT_DATE = DateTime.Now; wpaResult.CRT_DATE = DateTime.Now; wpaResult.REGISTRATION_ID = systemConfigResult.DEFAULT_REPORT_WPA_REGISTRATION_ID; wpaResult.REGISTRATION_NAME = systemConfigResult.DEFAULT_REPORT_WPA_REGISTRATION_NAME; wpaResult.LAB_SUPERVISOR_ID = systemConfigResult.DEFAULT_REPORT_WPA_LAB_SUPERVISOR_ID; wpaResult.LAB_SUPERVISOR_NAME = systemConfigResult.DEFAULT_REPORT_WPA_LAB_SUPERVISOR_NAME; wpaResult.AGENT_FLAG = true; wpaResult.SHOW_LV3_EACH_PAGE = true; wpaResult.SHOW_LV3_CONT = true; wpaResult.SHOW_LV2_CONT = false; this.ToolBarSwitch = "2122222222"; } else { wpaResult.ID = 0; wpaResult.IS_WA = true; wpaResult.IS_AWA = false; wpaResult.ANALYSYS_NO = null; wpaResult.JOB_NO = null; wpaResult.CRT_ID = null; wpaResult.CRT_DATE = DateTime.Now; wpaResult.CRT_MACHINE = null; wpaResult.CRT_NAME = null; wpaResult.UPD_ID = null; wpaResult.UPD_DATE = null; wpaResult.UPD_MACHINE = null; wpaResult.UPD_NAME = null; wpaResult.DEL_ID = null; wpaResult.DEL_DATE = null; wpaResult.DEL_MACHINE = null; wpaResult.DEL_NAME = null; wpaResult.REGISTRATION_ID = systemConfigResult.DEFAULT_REPORT_WPA_REGISTRATION_ID; wpaResult.REGISTRATION_NAME = systemConfigResult.DEFAULT_REPORT_WPA_REGISTRATION_NAME; wpaResult.LAB_SUPERVISOR_ID = systemConfigResult.DEFAULT_REPORT_WPA_LAB_SUPERVISOR_ID; wpaResult.LAB_SUPERVISOR_NAME = systemConfigResult.DEFAULT_REPORT_WPA_LAB_SUPERVISOR_NAME; wpaResult.AGENT_FLAG = true; wpaResult.AGENT_NAME = null; wpaResult.SHOW_LV3_EACH_PAGE = true; wpaResult.SHOW_LV3_CONT = true; wpaResult.SHOW_LV2_CONT = false; this.ToolBarSwitch = "2122222222"; } } else if (wpaResult.DEL_ID.IsNull()) { this.ToolBarSwitch = "2122112102"; } else { this.ToolBarSwitch = "2022002012"; } CtrlUtil.EnableControls(!wpaResult.Is_Canceled, txtCustomer, txtCustomerAddr, txtProject, txtProjectAddr, dtReceivedDate, dtAnalyticalDate, dtAnalyticalDateTo, chkShowLv3EachPage, chkShowLv3Cont, chkShowLv2Cont); CtrlUtil.EnableControls(OISDataInfo.UserInfomation.GROUP_ID == 3 && !wpaResult.Is_Canceled, txtRegistration, txtLabSupervisor); this.SetDataToControl(); } catch (Exception ex) { rMessageBox.ShowException(this, ex); } finally { this.Cursor = Cursors.Default; } }
private void RetriveData() { try { this.Cursor = Cursors.WaitCursor; systemConfigResult = vmSys.GetSystemConfig(); if (mode == ScreenMode.Add) { if (wplResult == null) { wplResult = new RPT001_WorkPlaceLightDTO(); wplResult.CRT_DATE = DateTime.Now; wplResult.REGISTRATION_ID = systemConfigResult.DEFAULT_REPORT_REGISTRATION_ID; wplResult.REGISTRATION_NAME = systemConfigResult.DEFAULT_REPORT_REGISTRATION_NAME; wplResult.LAB_SUPERVISOR_ID = systemConfigResult.DEFAULT_REPORT_LAB_SUPERVISOR_ID; wplResult.LAB_SUPERVISOR_NAME = systemConfigResult.DEFAULT_REPORT_LAB_SUPERVISOR_NAME; this.ToolBarSwitch = "2122222222"; CtrlUtil.EnableControls(true, cboReportCode); } else { wplResult.ID = 0; wplResult.REPORTNUMBER = null; wplResult.REPORT_CODE = null; wplResult.CRT_ID = null; wplResult.CRT_DATE = DateTime.Now; wplResult.CRT_MACHINE = null; wplResult.CRT_NAME = null; wplResult.UPD_ID = null; wplResult.UPD_DATE = null; wplResult.UPD_MACHINE = null; wplResult.UPD_NAME = null; wplResult.DEL_ID = null; wplResult.DEL_DATE = null; wplResult.DEL_MACHINE = null; wplResult.DEL_NAME = null; wplResult.REGISTRATION_ID = systemConfigResult.DEFAULT_REPORT_REGISTRATION_ID; wplResult.REGISTRATION_NAME = systemConfigResult.DEFAULT_REPORT_REGISTRATION_NAME; wplResult.LAB_SUPERVISOR_ID = systemConfigResult.DEFAULT_REPORT_LAB_SUPERVISOR_ID; wplResult.LAB_SUPERVISOR_NAME = systemConfigResult.DEFAULT_REPORT_LAB_SUPERVISOR_NAME; this.ToolBarSwitch = "2122222222"; CtrlUtil.EnableControls(true, cboReportCode); } } else if (wplResult.DEL_ID.IsNull()) { this.ToolBarSwitch = "2122122102"; CtrlUtil.EnableControls(false, cboReportCode); } else { this.ToolBarSwitch = "2022022012"; CtrlUtil.EnableControls(false, cboReportCode); } CtrlUtil.EnableControls(!wplResult.Is_Canceled, txtCustomer, txtCustomerAddr, txtProject, txtProjectAddr, dtMeasuredDate, dtMeasuredDateTo, dtTimeFrom, dtTimeTo, dtMeasuredDateNight, dtMeasuredDateNightTo, dtTimeFromNight, dtTimeToNight, btnUpdateCustomer, btnUpdateProject, chkShowLv3EachPage, chkShowLv3Cont, chkShowLv2Cont); CtrlUtil.EnableControls(OISDataInfo.UserInfomation.GROUP_ID == 3 && !wplResult.Is_Canceled, txtRegistration, txtLabSupervisor); //bs.DataSource = wplResult; BindData(); ApplySummary(); dtMeasuredDate_DateChange(null, null); dtMeasuredDateNight_DateChange(null, null); this.wplResult.Detail.AcceptChanges(); this.wplResult.User.AcceptChanges(); this.wplResult.Instrument.AcceptChanges(); } catch (Exception ex) { rMessageBox.ShowException(this, ex); } finally { this.Cursor = Cursors.Default; } }