/// <summary> /// 언어 정보 저장 /// </summary> public bool GroupUserMailing_Info_Save(GroupUserMailingEntity pGroupUserMailingEntity, DataTable dt) { try { DataTable dtTemp = null; bool isChack = CoFAS_ConvertManager.DataTable_FindCount(dt, "CRUD IN ('C','U','D')", ""); if (isChack) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD IN ('C','U','D')", ""); // 신규 and 수정 항목 데이터 테이블 화 } else { dtTemp = dt; } using (DBManager pDBManager = new DBManager()) { bool isReturn = new GroupUserMailingProvider(pDBManager).GroupUserMailing_Info_Save(pGroupUserMailingEntity, dtTemp); return(isReturn); } } catch (ExceptionManager pExceptionManager) { throw pExceptionManager; } catch (Exception pException) { throw new ExceptionManager(this, "GroupUserMailing_Info_Save(GroupUserMailingEntity pGroupUserMailingEntity, DataTable dt)", pException); } }
/// <summary> /// 언어 정보 저장 /// </summary> public bool MenuAuthority_T02_I20(MenuAuthority_T02Entity pMenuAuthority_T02Entity, DataTable dt) { try { DataTable dtTemp = null; bool isChack = CoFAS_ConvertManager.DataTable_FindCount(dt, "CRUD IN ('Y')", ""); if (isChack) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD IN ('Y')", ""); // 신규 and 수정 항목 데이터 테이블 화 } using (DBManager pDBManager = new DBManager()) { bool isReturn = new MenuAuthority_T02Provider(pDBManager).MenuAuthority_T02_I20(pMenuAuthority_T02Entity, dtTemp); return(isReturn); } } catch (ExceptionManager pExceptionManager) { throw pExceptionManager; } catch (Exception pException) { throw new ExceptionManager(this, "MenuAuthority_T02_I10(MenuAuthority_T02Entity pMenuAuthority_T02Entity, DataTable dt)", pException); } }
private void Form_InitialButtonClicked(object pSender, EventArgs pEventArgs) { try { CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor); if (_gdMAIN_VIEW.GridControl != null && CoFAS_ConvertManager.DataTable_FindCount(_gdMAIN_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", "")) { if (CoFAS_DevExpressManager.ShowQuestionMessage("작업중인 자료가 있습니다.\n초기화 하겠습니까?") == DialogResult.No) { return; } else { InitializeSetting(); DisplayMessage("초기화했습니다."); } } else { InitializeSetting(); DisplayMessage("초기화했습니다."); } } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } finally { CoFAS_DevExpressManager.SetCursor(this, Cursors.Default); } }
// ■ 리스트 뷰 추가 #region ○ 리스트 뷰 추가 public void Add_ListView(string strMsg, string strLine) { try { string strDate = CoFAS_ConvertManager.Date2String(DateTime.Now, CoFAS_ConvertManager.enDateType.DateTimeShort); string[] stritem = new string[] { strDate, strMsg };//, strLine }; CoFAS_ControlManager.InvokeIfNeeded(_lvLog, () => { ListViewItem li = new ListViewItem(stritem); _lvLog.Items.Insert(0, li); while (_lvLog.Items.Count > 100) { int intIndex = 0; intIndex = _lvLog.Items.Count - 1; CoFAS_ControlManager.InvokeIfNeeded(_lvLog, () => _lvLog.Items.RemoveAt(intIndex)); } ; } ); } catch (Exception ex) { } }
private void InitializeCorporationCI() { DataTable dtCI = new SystemSettingBusiness().CI_Download(); if (dtCI != null && (dtCI.Rows[0]["LOGO_FIRST"]).ToString().Length > 0 && (((byte[])dtCI.Rows[0]["LOGO_FIRST"]).Length > 0 && dtCI.Rows.Count > 0)) { if (System.IO.File.Exists(Application.StartupPath + "\\" + "logo.png")) { _ucIMG_LOGIN_LOGO.Image.Dispose(); _ucIMG_LOGIN_LOGO.Image = null; System.IO.File.Delete(Application.StartupPath + "\\" + "logo.png"); } Image imgCI = CoFAS_ConvertManager.byteArrayToImage((byte[])dtCI.Rows[0]["LOGO_FIRST"]); if (imgCI != null) { imgCI.Save(Application.StartupPath + "\\" + "logo.png"); } } if (System.IO.File.Exists(Application.StartupPath + "\\" + "logo.png")) { _ucIMG_LOGIN_LOGO.Image = Image.FromFile(Application.StartupPath + "\\" + "logo.png"); } else { _ucIMG_LOGIN_LOGO.Image = Properties.Resources.None; } }
void _Barcode_Received_Data(byte[] yReceiveData) { try { if (yReceiveData.Length > 0) { string pFindData = string.Empty; string vPart_code = string.Empty; string vMake_no = string.Empty; string vInspect_no = string.Empty; string vVend_Part_Code = string.Empty; string vReference_id = string.Empty; pFindData = CoFAS_ConvertManager.Bytes2String(yReceiveData, 0, 0); //pFindData = pFindData.Substring(0, pFindData.Length -5);//뒤에 개행문자 지울경우(2자리) pFindData = pFindData.Substring(0, 11); CoFAS_ControlManager.InvokeIfNeeded(_luBAR_CODE, () => _luBAR_CODE.Text = pFindData); MainFind_DisplayData(); //종료시 close시키기 //엑셀로 커서가게 //바코드세팅 com번호 가져오게하기 //기존 USP_BarcodeLabelPrint_R30를 수정하여 같이쓰게 하든가 아니면 별도로 가져오게하기 //dispose 예외처리하기 } Application.DoEvents(); //화면초기화 } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void CoFAS_DevGridEventManager_OnViewDoubleClick(object sender, EventArgs e) { GridView view = sender as GridView; if (view.GridControl.Name.ToString() == "_gdMAIN") { return; } DataRow dr = view.GetFocusedDataRow(); if (_gdMAIN_VIEW.GridControl == null) { return; } DataTable dtDbc = _gdMAIN_VIEW.GridControl.DataSource as DataTable; bool isDBCChack = CoFAS_ConvertManager.DataTable_FindCount(dtDbc, "DOCUMENT_ID IN ('" + dr["DOCUMENT_ID"].ToString() + "')", ""); if (!isDBCChack) { _gdMAIN_VIEW.AddNewRow(); int rowHandle = _gdMAIN_VIEW.GetRowHandle(_gdMAIN_VIEW.DataRowCount); if (_gdMAIN_VIEW.IsNewItemRow(rowHandle)) { _gdMAIN_VIEW.SetRowCellValue(rowHandle, "DOCUMENT_ID", dr["DOCUMENT_ID"].ToString()); _gdMAIN_VIEW.SetRowCellValue(rowHandle, "DOCUMENT_TYPE", dr["DOCUMENT_TYPE"].ToString()); _gdMAIN_VIEW.SetRowCellValue(rowHandle, "DOCUMENT_NAME", dr["DOCUMENT_NAME"].ToString()); _gdMAIN_VIEW.SetRowCellValue(rowHandle, "DOCUMENT_VER", dr["DOCUMENT_VER"].ToString()); } } _gdMAIN_VIEW.UpdateCurrentRow(); }
/// <summary> /// 언어 정보 저장 /// </summary> public bool Sample_Info_Save(DoorOpeningClosingStatusEntity pDoorOpeningClosingStatusEntity, DataTable dt) { try { DataTable dtTemp = null; bool isChack = CoFAS_ConvertManager.DataTable_FindCount(dt, "CRUD IN ('C','U','D')", ""); if (isChack) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD IN ('C','U','D')", ""); // 신규 and 수정 항목 데이터 테이블 화 } using (DBManager pDBManager = new DBManager()) { bool isReturn = new DoorOpeningClosingStatusProvider(pDBManager).Sample_Info_Save(pDoorOpeningClosingStatusEntity, dtTemp); return isReturn; } } catch (ExceptionManager pExceptionManager) { throw pExceptionManager; } catch (Exception pException) { throw new ExceptionManager(this, "Sample_Info_Save(DoorOpeningClosingStatusEntity pDoorOpeningClosingStatusEntity, DataTable dt)", pException); } }
/// <summary> /// 정보 저장 /// </summary> public bool ucEquipmentDocumentListPopup_Info_Save(ucEquipmentDocumentListPopupEntity pucEquipmentDocumentListPopupEntity, DataTable dt) { try { DataTable dtTemp = null; bool isChack = CoFAS_ConvertManager.DataTable_FindCount(dt, "CRUD IN ('C','U','D')", ""); if (isChack) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD IN ('C','U','D')", ""); // 신규 and 수정 항목 데이터 테이블 화 } using (DBManager pDBManager = new DBManager()) { bool isReturn = new ucEquipmentDocumentListPopupProvider(pDBManager).ucEquipmentDocumentListPopup_Info_Save(pucEquipmentDocumentListPopupEntity, dtTemp); return(isReturn); } } catch (ExceptionManager pExceptionManager) { throw pExceptionManager; } catch (Exception pException) { throw new ExceptionManager(this, "ucEquipmentDocumentListPopup_Info_Save(ucEquipmentDocumentListPopupEntity pucEquipmentDocumentListPopupEntity, DataTable dt)", pException); } }
/// <summary> /// 언어 정보 저장 /// </summary> public bool MonitoringDesigner_Info_Save(MonitoringDesignerEntity pMonitoringDesignerEntity, DataTable dt) { try { DataTable dtTemp = null; bool isChack = CoFAS_ConvertManager.DataTable_FindCount(dt, "CRUD IN ('C','U','D')", ""); if (isChack) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD IN ('C','U','D')", ""); // 신규 and 수정 항목 데이터 테이블 화 } using (DBManager pDBManager = new DBManager()) { bool isReturn = new MonitoringDesignerProvider(pDBManager).MonitoringDesigner_Info_Save(pMonitoringDesignerEntity, dtTemp); return(isReturn); } } catch (ExceptionManager pExceptionManager) { throw pExceptionManager; } catch (Exception pException) { throw new ExceptionManager(this, "Sample_Info_Save(SampleRegisterEntity pSampleRegisterEntity, DataTable dt)", pException); } }
// 메인 버튼 처리영역 #region ○ 조회 버튼 클릭시 처리하기 private void Form_SearchButtonClicked(object pSender, EventArgs pEventArgs) { try { CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor); if (CoFAS_ConvertManager.DataTable_FindCount(_gdMAIN_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", "")) { CoFAS_DevExpressManager.ShowInformationMessage("작업 중인 데이터가 있습니다."); } else { _pDynamicColumnInfoRegisterEntity.CRUD = "R"; //_pDynamicColumnInfoRegisterEntity.LANGUAGE_TYPE = _pLANGUAGE_TYPE; MainFind_DisplayData(); //DisplayMessage("조회 되었습니다."); DisplayMessage(_pMSG_SEARCH); } } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } finally { CoFAS_DevExpressManager.SetCursor(this, Cursors.Default); } }
/// <summary> /// 언어 정보 저장 /// </summary> public bool Grid_Info_Save(GridInfoRegisterEntity pGridInfoRegisterEntity, DataTable dt) { try { DataTable dtTemp = new DataTable(); bool isReturn = true; bool isChack = CoFAS_ConvertManager.DataTable_FindCount(dt, "CRUD IN ('C','U','D')", ""); if (isChack) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD IN ('C','U','D')", ""); // 신규 and 수정 항목 데이터 테이블 화 } if ((pGridInfoRegisterEntity.CRUD == "C" || pGridInfoRegisterEntity.CRUD == "U") || dtTemp.Rows.Count > 0) { using (DBManager pDBManager = new DBManager()) { isReturn = new GridInfoRegisterProvider(pDBManager).Grid_Info_Save(pGridInfoRegisterEntity, dtTemp); return(isReturn); } } else { return(isReturn); } } catch (ExceptionManager pExceptionManager) { throw pExceptionManager; } catch (Exception pException) { throw new ExceptionManager(this, "Grid_Info_Save(GridInfoRegisterEntity pGridInfoRegisterEntity, DataTable dt)", pException); } }
private void _ucbtREQUEST_Click(object sender, EventArgs e) { if (_Request_Click != null) { if (_gdMAIN_VIEW != null) { DataTable tDataTable = _gdMAIN_VIEW.GridControl.DataSource as DataTable; DataTable data = new DataTable(); DataTable empty_qty = new DataTable(); data = tDataTable; //tDataTable.Select("INPUT ='124'", "").CopyToDataTable(); // empty_qty = CoFAS_ConvertManager.DataTable_FindValue(tDataTable, "INPUT =''", ""); if (CoFAS_ConvertManager.DataTable_FindCount(tDataTable, "INPUT=''", "") || CoFAS_ConvertManager.DataTable_FindCount(tDataTable, "INPUT<'0'", "") || CoFAS_ConvertManager.DataTable_FindCount(tDataTable, "INPUT='0'", "")) { empty_qty = CoFAS_ConvertManager.DataTable_FindValue(tDataTable, "INPUT =''", ""); CoFAS_DevExpressManager.ShowInformationMessage("검체채취량을 입력하지 않은 것이 " + empty_qty.Rows.Count.ToString() + "건 있습니다."); return; } if (CoFAS_ConvertManager.DataTable_FindCount(tDataTable, "INPUT>'0'", "")) { data = CoFAS_ConvertManager.DataTable_FindValue(tDataTable, "INPUT >'0'", ""); } _dtreturn = data; _Request_Click(_gdMAIN_VIEW, e); } } }
private void _gdMAIN_VIEW_RowCellClick(object sender, RowCellClickEventArgs e) { try { GridView gv = sender as GridView; if ((_gdSUB02_VIEW.GridControl != null && CoFAS_ConvertManager.DataTable_FindCount(_gdSUB02_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", ""))) { if (CoFAS_DevExpressManager.ShowQuestionMessage("作業中の資料があります。\n作業をキャンセルなさいますか ?") == DialogResult.No) { return; } } _pPROCESS_MST_CODE = gv.GetFocusedRowCellValue("PROCESS_MST_CODE").ToString(); _pEQUIPMENT_CODE = gv.GetFocusedRowCellValue("EQUIPMENT_CODE").ToString(); _pInspectProcessMappingRegisterEntity.CRUD = "R"; _pInspectProcessMappingRegisterEntity.PROCESS_MST_CODE = _pPROCESS_MST_CODE; _pInspectProcessMappingRegisterEntity.EQUIPMENT_CODE = _pEQUIPMENT_CODE; Sub02Find_DisplayData(); } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } }
/// <summary> /// 언어 정보 저장 /// </summary> public bool SystemCode_Info_Save(SystemCodeRegisterEntity pSystemCodeRegisterEntity, DataTable dt, string code) { try { DataTable dtTemp = null; bool isChack = CoFAS_ConvertManager.DataTable_FindCount(dt, "CRUD IN ('C','U','D')", ""); if (isChack) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD IN ('C','U','D')", ""); // 신규 and 수정 항목 데이터 테이블 화 } else { dtTemp = dt; } using (DBManager pDBManager = new DBManager()) { bool isReturn = new SystemCodeRegisterProvider(pDBManager).SystemCode_Info_Save(pSystemCodeRegisterEntity, dtTemp, code); return(isReturn); } } catch (ExceptionManager pExceptionManager) { throw pExceptionManager; } catch (Exception pException) { throw new ExceptionManager(this, "SystemCode_Info_Save(SystemCodeRegisterEntity pSystemCodeRegisterEntity, DataTable dt, string code)", pException); } }
private void Form_SaveButtonClicked(object pSender, EventArgs pEventArgs) { try { CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor); if (CoFAS_DevExpressManager.ShowQuestionMessage(_pMSG_SAVE_QUESTION) == DialogResult.No) { return; } if (!dxValidationProvider.Validate()) { return; } //확인 if (_luBAD_GROUP_CODE.Text.Length > 0) { _pBadCodeMstRegisterEntity.CRUD = "U"; } else { _pBadCodeMstRegisterEntity.CRUD = "C"; } _pBadCodeMstRegisterEntity.BAD_GROUP_CODE = _luBAD_GROUP_CODE.Text.ToString(); _pBadCodeMstRegisterEntity.BAD_GROUP_NAME = _luBAD_GROUP_NAME.Text.ToString(); _pBadCodeMstRegisterEntity.USE_YN = _luUSE_YN.GetValue(); DataTable dtTemp = null; if (_gdSUB_VIEW.GridControl.DataSource != null) { if (CoFAS_ConvertManager.DataTable_FindCount(_gdSUB_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", "")) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(_gdSUB_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", ""); } } bool isReturn = false; using (DBManager pDBManager = new DBManager()) { isReturn = new BadCodeMstRegisterBusiness().BadCode_Info_Save(_pBadCodeMstRegisterEntity, dtTemp); } } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } catch (Exception pException) { DisplayMessage(string.Format("{0}", pException)); } finally { Form_InitialButtonClicked(null, null); Form_SearchButtonClicked(null, null); CoFAS_DevExpressManager.SetCursor(this, Cursors.Default); } }
private void _ucbtSAVE_Click(object sender, EventArgs e) { try { DataTable dt; dt = _gdMAIN.DataSource as DataTable; _gdMAIN_VIEW.FocusedRowHandle = -1; if ((CoFAS_ConvertManager.DataTable_FindCount(dt, "CRUD = 'Y'", ""))) { dtReturn = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD = 'Y'", ""); PO.UserForm.frmCommonPopup._DataTable = dtReturn; } //dtReturn = null; //_gdMAIN.DataSource = null; _chSave = true; if (_Close_Click != null) { _Close_Click(sender, e); } } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } finally { CoFAS_DevExpressManager.SetCursor(this, Cursors.Default); } }
private void _gdSUB01_VIEW_DoubleClick(object pObject, EventArgs pEventArgs) { try { GridView gv = pObject as GridView; if (_pPROCESS_MST_CODE == "" || _pEQUIPMENT_CODE == "") { return; } if ((_gdSUB02_VIEW.GridControl != null && CoFAS_ConvertManager.DataTable_FindCount(_gdSUB02_VIEW.GridControl.DataSource as DataTable, "INSPECT_CODE IN ('" + gv.GetFocusedRowCellValue("INSPECT_CODE").ToString() + "')", ""))) { CoFAS_DevExpressManager.ShowInformationMessage("既に登録されている点検項目です。"); return; } GridView gv1 = _gdSUB02_VIEW as GridView; gv1.OptionsBehavior.Editable = true; gv1.AddNewRow(); gv1.SetRowCellValue(gv1.FocusedRowHandle, "CRUD", "C"); gv1.SetRowCellValue(gv1.FocusedRowHandle, "EQUIPMENT_CODE", _pEQUIPMENT_CODE); gv1.SetRowCellValue(gv1.FocusedRowHandle, "INSPECT_CODE", gv.GetFocusedRowCellValue("INSPECT_CODE").ToString()); gv1.SetRowCellValue(gv1.FocusedRowHandle, "INSPECT_NAME", gv.GetFocusedRowCellValue("INSPECT_NAME").ToString()); gv1.SetRowCellValue(gv1.FocusedRowHandle, "INSPECT_VALUE", gv.GetFocusedRowCellValue("INSPECT_VALUE").ToString()); gv1.SetRowCellValue(gv1.FocusedRowHandle, "REMARK", gv.GetFocusedRowCellValue("REMARK").ToString()); gv.Focus(); gv1.Focus(); } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } }
// 메인 버튼 처리영역 #region ○ 조회 버튼 클릭시 처리하기 private void Form_SearchButtonClicked(object pSender, EventArgs pEventArgs) { try { CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor); if (CoFAS_ConvertManager.DataTable_FindCount(_gdMAIN.DataSource as DataTable, "CRUD IN ('C','U','D')", "")) { if (CoFAS_DevExpressManager.ShowQuestionMessage(_pMSG_WORKING + "\n" + _pMSG_RESET_QUESTION) == DialogResult.No) { MainFind_DisplayData(); DisplayMessage(_pMSG_SEARCH); } } else { MainFind_DisplayData(); DisplayMessage(_pMSG_SEARCH); } } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } finally { CoFAS_DevExpressManager.SetCursor(this, Cursors.Default); } }
/// <summary> /// 언어 정보 저장 /// </summary> public bool DynamicColumn_Info_Save(DynamicColumnInfoRegisterEntity pDynamicColumnInfoRegisterEntity, DataTable dt) { try { DataTable dtTemp = null; bool isChack = CoFAS_ConvertManager.DataTable_FindCount(dt, "CRUD IN ('C','U','D')", ""); if (isChack) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD IN ('C','U','D')", ""); // 신규 and 수정 항목 데이터 테이블 화 } using (DBManager pDBManager = new DBManager()) { bool isReturn = new DynamicColumnInfoRegisterProvider(pDBManager).DynamicColumn_Info_Save(pDynamicColumnInfoRegisterEntity, dtTemp); return(isReturn); } } catch (ExceptionManager pExceptionManager) { throw pExceptionManager; } catch (Exception pException) { throw new ExceptionManager(this, "DynamicColumn_Info_Save(DynamicColumnInfoRegisterEntity pDynamicColumnInfoRegisterEntity, DataTable dt)", pException); } }
private void Form_Closing(object pSender, FormClosingEventArgs pFormClosingEventArgs) { try { //그리드 작업 정보 확인 하기 _gdSUB_VIEW if (_gdSUB_VIEW.GridControl != null && CoFAS_ConvertManager.DataTable_FindCount(_gdSUB_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", "")) { //if (CoFAS_DevExpressManager.ShowQuestionMessage("작업중인 자료가 있습니다.\n종료 하겠습니까?") == DialogResult.No) if (CoFAS_DevExpressManager.ShowQuestionMessage(_pMSG_WORKING + "\n" + _pMSG_EXIT_QUESTION) == DialogResult.No) { pFormClosingEventArgs.Cancel = true; return; } } pFormClosingEventArgs.Cancel = false; } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); throw pExceptionManager; } catch (Exception pException) { throw new ExceptionManager(this, "InputData_Save(DataTable dtSave)", pException); } }
private void _gdMAIN_VIEW_RowCellClick(object sender, RowCellClickEventArgs e) { try { GridView gv = sender as GridView; if ((_gdSUB02_VIEW.GridControl != null && CoFAS_ConvertManager.DataTable_FindCount(_gdSUB02_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", ""))) { if (CoFAS_DevExpressManager.ShowQuestionMessage("작업중인 자료가 있습니다.\n다른품목을 선택하시겠습니까?") == DialogResult.No) { return; } } _pPART_TYPE = gv.GetFocusedRowCellValue("PART_TYPE").ToString(); _pPART_CODE = gv.GetFocusedRowCellValue("PART_CODE").ToString(); _pPART_NAME = gv.GetFocusedRowCellValue("PART_NAME").ToString(); _pInspectPartMappingRegisterEntity.CRUD = "R"; _pInspectPartMappingRegisterEntity.PART_TYPE = _pPART_TYPE; _pInspectPartMappingRegisterEntity.PART_CODE = _pPART_CODE; Sub02Find_DisplayData(); } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } }
private void InputData_Save() { try { CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor); bool isError = false; DataTable dtBOM = null; DataTable dt = null; DataTable dtTemp = null; using (DBManager pDBManager = new DBManager()) { if (CoFAS_DevExpressManager.ShowQuestionMessage(_pMSG_SAVE_QUESTION) == DialogResult.Yes) { dtBOM = _gdMAIN.DataSource as DataTable; dt = _gdSUB.DataSource as DataTable; if (CoFAS_ConvertManager.DataTable_FindCount(dt, "CRUD IN ('C','U','D')", "")) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD IN ('C','U','D')", ""); for (int i = 0; i < dtTemp.Rows.Count; i++) { if (Convert.ToDecimal(dtTemp.Rows[i]["USAGE_QTY"].ToString()) == 0) { CoFAS_DevExpressManager.ShowInformationMessage("출고수량이 0인 항목이 있습니다."); return; } } } isError = new ucMeterialUsagePopupBusiness().ucMeterialUsagePopup_Info_Save(_pucMeterialUsagePopupEntity, dtTemp); if (isError) { //CoFAS_DevExpressManager.ShowInformationMessage("저장 오류 발생! 데이터를 확인 하세요."); CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE_ERROR); } else { //정상 처리 InitializeSetting(); //CoFAS_DevExpressManager.ShowInformationMessage("저장 처리 되었습니다."); CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE); } } } } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } finally { CoFAS_DevExpressManager.SetCursor(this, Cursors.Default); } }
private void Form_InitialButtonClicked(object pSender, EventArgs pEventArgs) { try { CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor); if (_gdMAIN_VIEW.GridControl != null && CoFAS_ConvertManager.DataTable_FindCount(_gdMAIN_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", "")) { //if (CoFAS_DevExpressManager.ShowQuestionMessage("작업중인 자료가 있습니다.\n초기화 하겠습니까?") == DialogResult.No) if (CoFAS_DevExpressManager.ShowQuestionMessage(_pMSG_WORKING + "\n" + _pMSG_RESET_QUESTION) == DialogResult.No) { return; } else { InitializeSetting(); _luWINDOW_GUBN.AddValue(new CommonCodeReturnBusiness().CommonCode_Return("R", _pLANGUAGE_TYPE, "MENU_LIST_GUBN", "", "", "").Tables[0], 0, 0, ""); //_luWINDOW_NAME.AddValue(new CommonCodeReturnBusiness().CommonCode_Return("R", "MENU_LIST", "", "", "").Tables[0], 0, 0, ""); _luLANGUAGE_TYPE.AddValue(new CommonCodeReturnBusiness().CommonCode_Return("R", _pLANGUAGE_TYPE, "COMMON_CODE", "MM11", "", "").Tables[0], 0, 0, ""); _luUSE_YN.AddValue(new CommonCodeReturnBusiness().CommonCode_Return("R", _pLANGUAGE_TYPE, "USE_YN", "", "", "").Tables[0], 0, 0, ""); // 컨트롤러 유효성 검증 처리 기본 컨트롤러 에서만 사용 dxValidationProvider.ValidationMode = DevExpress.XtraEditors.DXErrorProvider.ValidationMode.Manual; dxValidationProvider.Validate(); _gdMAIN.DataSource = null; _pLocation_Code = ""; //DisplayMessage("초기화했습니다."); DisplayMessage(_pMSG_RESET_COMPLETE); } } else { InitializeSetting(); _luWINDOW_GUBN.AddValue(new CommonCodeReturnBusiness().CommonCode_Return("R", _pLANGUAGE_TYPE, "MENU_LIST_GUBN", "", "", "").Tables[0], 0, 0, ""); //_luWINDOW_NAME.AddValue(new CommonCodeReturnBusiness().CommonCode_Return("R", "MENU_LIST", "", "", "").Tables[0], 0, 0, ""); _luLANGUAGE_TYPE.AddValue(new CommonCodeReturnBusiness().CommonCode_Return("R", _pLANGUAGE_TYPE, "COMMON_CODE", "MM11", "", "").Tables[0], 0, 0, ""); _luUSE_YN.AddValue(new CommonCodeReturnBusiness().CommonCode_Return("R", _pLANGUAGE_TYPE, "USE_YN", "", "", "").Tables[0], 0, 0, ""); // 컨트롤러 유효성 검증 처리 기본 컨트롤러 에서만 사용 dxValidationProvider.ValidationMode = DevExpress.XtraEditors.DXErrorProvider.ValidationMode.Manual; dxValidationProvider.Validate(); _gdMAIN.DataSource = null; //DisplayMessage("초기화했습니다."); DisplayMessage(_pMSG_RESET_COMPLETE); } } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } finally { CoFAS_DevExpressManager.SetCursor(this, Cursors.Default); } }
private void _btSettingCILogo_Click(object sender, EventArgs e) { DataTable dtCI = new SystemSettingBusiness().CI_Download(); if (dtCI == null || dtCI.Rows.Count > 0) { Image imgCI = CoFAS_ConvertManager.byteArrayToImage((byte[])dtCI.Rows[0]["LOGO_FIRST"]); imgCI.Save(Application.StartupPath + "\\" + "logo.png"); } }
private void _gdMAIN_VIEW_InitNewRow(object sender, InitNewRowEventArgs e) { if (CoFAS_ConvertManager.DataTable_FindCount(_gdSUB_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", "")) { CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_WORKING); return; } DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView; view.SetRowCellValue(e.RowHandle, view.Columns["USE_YN"], "Y"); }
private void send_data(byte[] btData) { btArry = null; btArry = CoFAS_ConvertManager.BytesMerge(Encoding.UTF8.GetBytes("$GS,4,8,"), btData); str = CoFAS_ConvertManager.ByteArray2HexString(btArry, " "); Add_ListView("송신 : " + str, ""); _pCoFAS_SocketServer.m_socWorker.Send(btArry); }
private void InputData_Save(DataTable pDataTable) { try { CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor); bool isError = false; _pWorkOrderInfoPopup_T03Entity.CRUD = "C"; _pWorkOrderInfoPopup_T03Entity.USER_CODE = _pUSER_CODE; DataTable dt; DataTable dtTemp; //string _ptime = System.DateTime.Now.ToString("yyyyMMddHHmmss"); //_pWorkOrderInfoPopup_T03Entity.REFERENCE_ID = _luPLAN_ORDER_ID.Text; //계획정보를 레퍼런스에 담음 //_pWorkOrderInfoPopup_T03Entity.FILE_NAME = "PRODUCTION/"+_ptime + "_" + _pWorkOrderInfoPopup_T03Entity.REFERENCE_ID + "_작업요청서." + _pFile_Attr; if (CoFAS_DevExpressManager.ShowQuestionMessage(_pMSG_SAVE_QUESTION) == DialogResult.Yes) { dt = _gdMAIN.DataSource as DataTable; if (CoFAS_ConvertManager.DataTable_FindCount(dt, "CRUD IN ('C','U','D') AND PRODUCTION_ORDER_QTY > 0", "")) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD IN ('C','U','D') AND PRODUCTION_ORDER_QTY > 0", ""); _pWorkOrderInfoPopup_T03Entity.CRUD = "C"; isError = new ucWorkOrderInfoPopup_T03Business().ucWorkOrderInfoPopup_T03_Save(_pWorkOrderInfoPopup_T03Entity, dtTemp); if (isError) { //오류 발생. //CoFAS_DevExpressManager.ShowInformationMessage("저장 오류 발생! 데이터를 확인 하세요."); CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE_ERROR); } else { //정상 처리 //CoFAS_DevExpressManager.ShowInformationMessage("저장 처리 되었습니다."); CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE); } } } //팝업 닫기 _btCancle_Click(null, null); //} } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } finally { CoFAS_DevExpressManager.SetCursor(this, Cursors.Default); } }
private void _ucbtcontract_SAVE_Click(object sender, EventArgs e) { try { CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor); bool isError = false; DataTable dt; DataTable dtTemp = null; //if (CoFAS_DevExpressManager.ShowQuestionMessage("저장 하시겠습니까?") == DialogResult.Yes) if (CoFAS_DevExpressManager.ShowQuestionMessage(_pMSG_SAVE_QUESTION) == DialogResult.Yes) { dt = _gdMAIN.DataSource as DataTable; if ((CoFAS_ConvertManager.DataTable_FindCount(dt, "CRUD IN ('C','U','D') AND ORDER_QTY > 0", ""))) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD IN ('C','U','D') AND ORDER_QTY > 0", ""); _pOrderNumberInfoPopup_Entity.CRUD = "C"; for (int i = 0; i < dtTemp.Rows.Count; i++) { dtTemp.Rows[i]["CRUD"] = "C"; } isError = new ProductPlanRegister_T02Business().ProductPlanSub_Save(_pOrderNumberInfoPopup_Entity, dtTemp); if (!isError) { //CoFAS_DevExpressManager.ShowInformationMessage("저장 처리 되었습니다."); CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE); _pLocation_Code = _pOrderNumberInfoPopup_Entity.RTN_KEY; //저장 위치 _gdMAIN.DataSource = null; //팝업 닫기 _btCancle_Click(null, null); } else { //CoFAS_DevExpressManager.ShowInformationMessage("저장 오류 발생! 데이터를 확인 하세요."); CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE_ERROR); } } } } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } finally { CoFAS_DevExpressManager.SetCursor(this, Cursors.Default); } }
private void InputData_Save() { try { CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor); DataTable dtTemp = null; bool isError = false; if (_gdMAIN_VIEW.GridControl.DataSource != null) { if (CoFAS_ConvertManager.DataTable_FindCount(_gdMAIN_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", "")) { dtTemp = CoFAS_ConvertManager.DataTable_FindValue(_gdMAIN_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", ""); } } bool isReturn = false; using (DBManager pDBManager = new DBManager()) { isReturn = new QualityInspectBusiness().QualityInspect_Info_Save(_pQualityInspectEntity, dtTemp); } if (isReturn) { ////오류 발생. //CoFAS_DevExpressManager.ShowInformationMessage("저장 오류 발생! 데이터를 확인 하세요."); CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE_ERROR); //화면 표시. } else { ////정상 처리 CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE); // 화면 갱신 _pQualityInspectEntity.CRUD = "R"; _pLocation_Code = _pQualityInspectEntity.RTN_KEY; //저장 위치 MainFind_DisplayData(); } } catch (ExceptionManager pExceptionManager) { CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString())); } finally { CoFAS_DevExpressManager.SetCursor(this, Cursors.Default); } }