Exemplo n.º 1
0
        /// <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);
            }
        }
Exemplo n.º 2
0
        /// <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 _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);
     }
 }
Exemplo n.º 4
0
        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);
            }
        }
Exemplo n.º 5
0
        /// <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);
            }
        }
Exemplo n.º 6
0
        /// <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);
            }
        }
Exemplo n.º 7
0
        /// <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);
            }
        }
        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);
                }
            }
        }
Exemplo n.º 9
0
        /// <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);
            }
        }
Exemplo n.º 10
0
        /// <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);
            }
        }
Exemplo n.º 11
0
        /// <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);
            }
        }
Exemplo n.º 12
0
        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 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);
            }
        }
Exemplo n.º 14
0
        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);
            }
        }
Exemplo n.º 15
0
        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);
            }
        }
        private void InputData_Save(InspectFinalApprovalRegisterT01Entity _pInspectFinalApprovalRegisterT01Entity)
        {
            try
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor);
                bool      isError = false;
                DataTable dt      = null;
                DataTable dtTemp  = null;

                using (DBManager pDBManager = new DBManager())
                {
                    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')", ""))
                        {
                            dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "CRUD IN ('C','U','D')", "");

                            isError = new InspectFinalApprovalRegisterT01Business().InspectFinalApprovalRegisterT01_Mst_Info_Save(_pInspectFinalApprovalRegisterT01Entity, dtTemp);

                            if (isError)
                            {
                                //CoFAS_DevExpressManager.ShowInformationMessage("저장 오류 발생! 데이터를 확인 하세요.");
                                CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE_ERROR);
                            }
                            else
                            {
                                //정상 처리
                                InitializeSetting();
                                //CoFAS_DevExpressManager.ShowInformationMessage("저장 처리 되었습니다.");
                                CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE);
                                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);
            }
        }
Exemplo n.º 17
0
        private void _btSAVE_CONTROLS_Click(object sender, EventArgs e)
        {
            try
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor);

                DataTable dtTemp = null;

                bool isChack = CoFAS_ConvertManager.DataTable_FindCount(_gdMAIN_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", "");

                if (isChack)
                {
                    dtTemp = CoFAS_ConvertManager.DataTable_FindValue(_gdMAIN_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", "");
                }
                else
                {
                    return;
                }


                //DataTable dtTemp = CoFAS_ConvertManager.DataTable_FindValue(_gdMAIN_VIEW.GridControl.DataSource as DataTable, "CRUD IN ('C','U','D')", ""); // 신규 and 수정 항목 데이터 테이블 화

                if (dtTemp.Rows.Count > 0)
                {
                    Controls_InputData_Save(dtTemp);
                }
                else
                {
                    //CoFAS_DevExpressManager.ShowInformationMessage("입력 된 저장 항목이 없습니다.");
                }
            }
            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 _ucbtMOVE_Click(object sender, EventArgs e)
        {
            DataTable dt = _gdSUB_VIEW.GridControl.DataSource as DataTable;

            DataTable dtTemp = null;

            bool isChack = CoFAS_ConvertManager.DataTable_FindCount(dt, "MOVE IN ('Y')", "");

            if (isChack)
            {
                dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dt, "MOVE IN ('Y')", ""); // 신규 and 수정 항목 데이터 테이블 화

                for (int a = 0; a < dtTemp.Rows.Count; a++)
                {

                    DataTable dtCheck = _gdMAIN_VIEW.GridControl.DataSource as DataTable;

                    bool isNewChack = CoFAS_ConvertManager.DataTable_FindCount(dtCheck, "DOCUMENT_ID IN ('"+ dtTemp.Rows[a]["DOCUMENT_ID"].ToString() + "')", "");

                    if (!isNewChack)
                    {
                        _gdMAIN_VIEW.AddNewRow();

                        int rowHandle = _gdMAIN_VIEW.GetRowHandle(_gdMAIN_VIEW.DataRowCount);
                        if (_gdMAIN_VIEW.IsNewItemRow(rowHandle))
                        {
                            _gdMAIN_VIEW.SetRowCellValue(rowHandle, "DOCUMENT_ID", dtTemp.Rows[a]["DOCUMENT_ID"].ToString());
                            _gdMAIN_VIEW.SetRowCellValue(rowHandle, "DOCUMENT_TYPE", dtTemp.Rows[a]["DOCUMENT_TYPE"].ToString());
                            _gdMAIN_VIEW.SetRowCellValue(rowHandle, "DOCUMENT_NAME", dtTemp.Rows[a]["DOCUMENT_NAME"].ToString());
                            _gdMAIN_VIEW.SetRowCellValue(rowHandle, "DOCUMENT_FILE_NAME", dtTemp.Rows[a]["DOCUMENT_FILE_NAME"].ToString());
                            _gdMAIN_VIEW.SetRowCellValue(rowHandle, "DOCUMENT_VER", dtTemp.Rows[a]["DOCUMENT_VER"].ToString());
                        }
                    }
                }
            }

            _gdMAIN_VIEW.UpdateCurrentRow();

        }
Exemplo n.º 19
0
        /// <summary>
        /// 언어 정보 저장
        /// </summary>
        public bool Message_Info_Save(MessageInfoRegisterEntity pMessageInfoRegisterEntity, 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 (dtTemp.Rows.Count > 0)
                //{
                using (DBManager pDBManager = new DBManager())
                {
                    isReturn = new MessageInfoRegisterProvider(pDBManager).Message_Info_Save(pMessageInfoRegisterEntity, dtTemp);
                    return(isReturn);
                }
                //}
                //else
                // {
                //    return isReturn;
                // }
            }
            catch (ExceptionManager pExceptionManager)
            {
                throw pExceptionManager;
            }
            catch (Exception pException)
            {
                throw new ExceptionManager(this, "Message_Info_Save(MessageInfoRegisterEntity pMessageInfoRegisterEntity, DataTable dt)", pException);
            }
        }
Exemplo n.º 20
0
        private void ucSimpleButton2_Click(object sender, EventArgs e)
        {
            bool      isError = false;
            DataTable _dt     = null;
            DataTable _dtTemp = null;

            try
            {
                if (CoFAS_DevExpressManager.ShowQuestionMessage("데이터를 등록하시겠습니까?") == DialogResult.Yes)
                {
                    pfrmPOPMain_PRESS_LINEEntity.CRUD                = "C";
                    pfrmPOPMain_PRESS_LINEEntity.USER_CODE           = _pUSER_CODE;
                    pfrmPOPMain_PRESS_LINEEntity.PRODUCTION_ORDER_ID = sPRODUCTION_ORDER_ID;

                    #region 결과테이블 생성
                    DataTable resultdt = new DataTable();
                    resultdt.Columns.Add(new DataColumn("RESOURCE_CODE", typeof(string)));
                    resultdt.Columns.Add(new DataColumn("COLLECTION_DATE", typeof(string)));
                    resultdt.Columns.Add(new DataColumn("PROPERTY_VALUE", typeof(string)));
                    resultdt.Columns.Add(new DataColumn("CONDITION_CODE", typeof(string)));
                    resultdt.Columns.Add(new DataColumn("COLLECTION_VALUE", typeof(string)));

                    DataRow row = null;
                    #endregion



                    _dt = _gdMAIN.DataSource as DataTable;
                    if (CoFAS_ConvertManager.DataTable_FindCount(_dt, "CRUD IN ('C') AND PRODUCTION_NG_RESULT > 0", ""))
                    {
                        _dtTemp = CoFAS_ConvertManager.DataTable_FindValue(_dt, "CRUD IN ('C') AND PRODUCTION_NG_RESULT > 0", "");

                        // 실적데이터 추가
                        row = resultdt.NewRow();
                        row["RESOURCE_CODE"]    = pfrmPOPMain_PRESS_LINEEntity.PROCESS_CODE;;
                        row["COLLECTION_DATE"]  = DateTime.Now.ToString("yyyyMMddHHmmss");
                        row["PROPERTY_VALUE"]   = pfrmPOPMain_PRESS_LINEEntity.LOT_ID;
                        row["CONDITION_CODE"]   = "CD501001";
                        row["COLLECTION_VALUE"] = _lbPRODUCTION_OK_QTY.Text.ToString();
                        resultdt.Rows.Add(row);

                        // 불량데이터 추가
                        for (int i = 0; i < _dtTemp.Rows.Count; i++)
                        {
                            row = resultdt.NewRow();
                            row["RESOURCE_CODE"]    = pfrmPOPMain_PRESS_LINEEntity.PROCESS_CODE;
                            row["COLLECTION_DATE"]  = DateTime.Now.ToString("yyyyMMddHHmmss");
                            row["PROPERTY_VALUE"]   = pfrmPOPMain_PRESS_LINEEntity.LOT_ID;
                            row["CONDITION_CODE"]   = _dtTemp.Rows[i]["BAD_CODE"].ToString();
                            row["COLLECTION_VALUE"] = _dtTemp.Rows[i]["PRODUCTION_NG_RESULT"].ToString();
                            resultdt.Rows.Add(row);
                        }

                        isError = new frmPOPMain_PRESS_LINEBusiness().pfrmPOPMain_PRESS_LINE_LOT_RESULT(pfrmPOPMain_PRESS_LINEEntity, resultdt);

                        if (!isError)
                        {
                            _pLOT_COMPLETE = true;
                            Refresh_DisplayData();
                            _gdMAIN.Enabled = false;
                        }
                        else
                        {
                            //CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE_ERROR);
                            CoFAS_DevExpressManager.ShowInformationMessage("저장 실패");
                        }
                    }
                }
            }
            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)
        {
            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;
            }

            _btCancle_Click(null, null);
            //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", "");

            //            _pucOutsourcingInfoPopupEntity.CRUD = "C";
            //            for(int i=0;i<dtTemp.Rows.Count;i++)
            //            {
            //                dtTemp.Rows[i]["CRUD"] = "C";
            //            }
            //            isError = new ProductPlanRegister_T02Business().ProductPlanSub_Save(_pucOutsourcingInfoPopupEntity, dtTemp);

            //            if (!isError)
            //            {
            //                //CoFAS_DevExpressManager.ShowInformationMessage("저장 처리 되었습니다.");
            //                CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE);
            //                _pLocation_Code = _pucOutsourcingInfoPopupEntity.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(DataTable dtSave)
        {
            try
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor);
                DataTable tDataTable = _gdMAIN_VIEW.GridControl.DataSource as DataTable;

                DataTable tTempData = new DataTable();

                if (tDataTable != null)
                {
                    for (int i = 0; i < tDataTable.Rows.Count; i++)
                    {
                        if (tDataTable.Rows[i]["CRUD"].ToString() == "Y")
                        {
                            tTempData = CoFAS_ConvertManager.DataTable_FindValue(tDataTable, "CRUD ='Y'", "");

                            break;
                        }
                    }
                }

                if (_gdMAIN_VIEW.RowCount >= 0)
                {
                    if ((tTempData != null && tTempData.Rows.Count > 0) || (tTempData != null && _pCRUD == ""))
                    {
                        CoFAS_DevExpressManager.BindGridControl(_gdMAIN, _gdMAIN_VIEW, tTempData);
                    }

                    SaveFileDialog mDlg = new SaveFileDialog();
                    mDlg.InitialDirectory = Application.StartupPath;
                    //mDlg.Filter = "Excel files (*.xls)|*.xls|All files (*.*)|*.*";
                    mDlg.Filter      = "Excel files (*.xls)|*.xls|Excel files (*.xlsx)|*.xlsx|All files (*.*)|*.*";
                    mDlg.FilterIndex = 1;
                    if (mDlg.ShowDialog() == DialogResult.OK)
                    {
                        _gdMAIN_VIEW.ExportToXlsx(mDlg.FileName);
                        CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE);
                    }
                }
                else
                {
                    SaveFileDialog mDlg = new SaveFileDialog();
                    mDlg.InitialDirectory = Application.StartupPath;
                    //mDlg.Filter = "Excel files (*.xls)|*.xls|All files (*.*)|*.*";
                    mDlg.Filter      = "Excel files (*.xls)|*.xls|Excel files (*.xlsx)|*.xlsx|All files (*.*)|*.*";
                    mDlg.FilterIndex = 1;
                    if (mDlg.ShowDialog() == DialogResult.OK)
                    {
                        _gdMAIN_VIEW.ExportToXlsx(mDlg.FileName);
                        CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE);
                    }
                }


                //CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor);

                //string strFTP_PATH = "";
                //string strUSE_TYPE = "";
                //string strFILE_NAME = "";

                //_pTabletBasedSensorInfoPopup_T02Entity.CRUD = "R";

                ////조회할거 프로시져
                //_dtList = new TabletBasedSensorInfoPopup_T02Business().Sheet_Info_Sheet(_pTabletBasedSensorInfoPopup_T02Entity);   //엑셀 시트 조회하기

                ////엑셀서식관리 되면 다시 설정하기

                //strUSE_TYPE = _dtList.Rows[0]["USE_TYPE"].ToString();
                //strFILE_NAME = _dtList.Rows[0]["FILE_NAME"].ToString();

                //SaveFileDialog saveFile = new SaveFileDialog();
                //saveFile.InitialDirectory = @"C:\";
                //saveFile.Filter = "Excel.XLSX(*.xlsx) | *.xls | ALL(*.*) | *.*";
                //saveFile.FileName = strFILE_NAME.ToString();

                ///*
                //strUSE_TYPE = "VIEW";
                //strFILE_NAME = "HACCPCheckRegister_T07_Sample_v1.xlsx";
                //*/
                //switch (strUSE_TYPE)
                //{
                //    case "PRINT":
                //        strFTP_PATH = string.Format(@"{0}{1}/{2}/", _pFTP_PATH, "ORDER_FORM", _pWINDOW_NAME);
                //        break;
                //    case "VIEW":
                //        strFTP_PATH = string.Format(@"{0}{1}/{2}/{3}/", _pFTP_PATH, "USER", "PROGRAM_VIEW", _pWINDOW_NAME);
                //        break;
                //    case "REGIT":
                //        strFTP_PATH = string.Format(@"{0}{1}/{2}/{3}/", _pFTP_PATH, "USER", "PROGRAM_VIEW", _pWINDOW_NAME);
                //        break;
                //}

                //if (saveFile.ShowDialog() == DialogResult.OK)
                //{
                //    _pFTP_DOWNLOAD_PATH = saveFile.FileName;

                //    CoFAS_FTPManager.FTPDownLoad(strFTP_PATH, strFILE_NAME.ToString(), _pFTP_ID, _pFTP_PW, _pFTP_DOWNLOAD_PATH);
                //}

                //string curfile = Application.StartupPath + "\\Template\\" + strFILE_NAME;

                //// 같은 것이 있으면, 폴더에서 해당 파일명을 불러와서 SpreadSheet에 띄우기 / 없으면, 폴더에 다운
                //if (!File.Exists(curfile))
                //{
                //    CoFAS_FTPManager.FTPDownLoad(strFTP_PATH, strFILE_NAME, _pFTP_ID, _pFTP_PW, curfile, false);

                //}

                ////using (FileStream file = File.OpenWrite(curfile))
                //using (Stream file = File.Open(curfile, FileMode.Open))
                //{
                //    if (file != null)
                //    {
                //        IWorkbook workbook =

                //            //Workbooks.OpenFromStream(file);


                //    }
                //}
            }
            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);
            }
        }
Exemplo n.º 23
0
        public bool SystemCode_Info_Save(SystemCodeRegisterEntity pSystemCodeRegisterEntity, DataTable dtFirst, DataTable dtSecond, DataTable dtThird)
        {
            try
            {
                DataTable dtTemp  = null;
                DataTable dtWork  = null;
                bool      isChack = false;

                for (int a = 0; a < 3; a++)
                {
                    switch (a)
                    {
                    case 0:

                        isChack = false;
                        isChack = CoFAS_ConvertManager.DataTable_FindCount(dtFirst, "CRUD IN ('C','U','D')", "");
                        if (isChack)
                        {
                            dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dtFirst, "CRUD IN ('C','U','D')", "");     // 신규 and 수정 항목 데이터 테이블 화
                        }

                        break;

                    case 1:

                        isChack = false;
                        isChack = CoFAS_ConvertManager.DataTable_FindCount(dtSecond, "CRUD IN ('C','U','D')", "");
                        if (isChack)
                        {
                            dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dtSecond, "CRUD IN ('C','U','D')", "");     // 신규 and 수정 항목 데이터 테이블 화
                        }

                        break;

                    case 2:

                        isChack = false;
                        isChack = CoFAS_ConvertManager.DataTable_FindCount(dtThird, "CRUD IN ('C','U','D')", "");
                        if (isChack)
                        {
                            dtTemp = CoFAS_ConvertManager.DataTable_FindValue(dtThird, "CRUD IN ('C','U','D')", "");     // 신규 and 수정 항목 데이터 테이블 화
                        }
                        break;
                    }
                }

                using (DBManager pDBManager = new DBManager())
                {
                    bool isReturn = new SystemCodeRegisterProvider(pDBManager).SystemCode_Info_Save(pSystemCodeRegisterEntity, dtTemp);
                    return(isReturn);
                }
            }
            catch (ExceptionManager pExceptionManager)
            {
                throw pExceptionManager;
            }
            catch (Exception pException)
            {
                throw new ExceptionManager(this, "SystemCode_Info_Save(SystemCodeRegisterEntity pSystemCodeRegisterEntity, DataTable dtFirst, DataTable dtSecond, DataTable dtThird)", pException);
            }
        }