예제 #1
0
        private void File_Delete()
        {
            try
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor);

                bool isError = false;

                _pMenuInfoRegisterEntity.CRUD               = "U";
                _pMenuInfoRegisterEntity.MENU_CODE          = _gdSUB_VIEW.GetFocusedRowCellValue("MENU_CODE").ToString();
                _pMenuInfoRegisterEntity.TEMPLETE_SEQ       = _gdSUB_VIEW.GetFocusedRowCellValue("TEMPLETE_SEQ").ToString();
                _pMenuInfoRegisterEntity.TEMPLETE_NAME      = _gdSUB_VIEW.GetFocusedRowCellValue("TEMPLETE_NAME").ToString();
                _pMenuInfoRegisterEntity.TEMPLETE_FILE_NAME = "";
                _pMenuInfoRegisterEntity.REMARK             = _gdSUB_VIEW.GetFocusedRowCellValue("REMARK").ToString();
                _pMenuInfoRegisterEntity.USE_YN             = _gdSUB_VIEW.GetFocusedRowCellValue("USE_YN").ToString();

                _pMenuInfoRegisterEntity.TEMPLETE_BEFROE_FILE_NAME = _gdSUB_VIEW.GetFocusedRowCellValue("TEMPLETE_BEFROE_FILE_NAME").ToString();

                isError = new MenuInfoRegisterBusiness().MenuInfoRegister_Info_Delete(_pMenuInfoRegisterEntity);

                string strFTP_PATH = "";

                if (isError)
                {
                    //오류 발생.
                    CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_DELETE_ERROR);
                }
                else
                {
                    //정상 처리
                    strFTP_PATH = string.Format(@"{0}{1}/{2}/", _pMenuInfoRegisterEntity.FTP_IP_PORT, "PROGRAM_VIEW", _pMenuInfoRegisterEntity.MENU_CODE);

                    string qFileName = _pMenuInfoRegisterEntity.TEMPLETE_BEFROE_FILE_NAME;
                    string qPath     = strFTP_PATH;

                    CoFAS_FTPManager.FTPDelete(qFileName, qPath, _pFTP_ID, _pFTP_PW);

                    CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_DELETE);

                    _pMenuInfoRegisterEntity.CRUD      = "R";
                    _pMenuInfoRegisterEntity.MENU_CODE = _luMENU_CODE.Text.ToString();

                    SubDetailFind_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);
            }
        }
예제 #2
0
        private void InputData_Save(DataTable dtSave)
        {
            try
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor);

                bool isError = false;

                isError = new MenuInfoRegisterBusiness().MenuInfoRegister_Info_Save(_pMenuInfoRegisterEntity, dtSave);

                if (isError)
                {
                    //오류 발생.
                    CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE_ERROR + "\n" + _pMSG_CHECK_VALID_ITEM);
                }
                else
                {
                    //정상 처리
                    CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_SAVE);

                    // 화면 갱신
                    _pMenuInfoRegisterEntity.CRUD      = "R";
                    _pMenuInfoRegisterEntity.MENU_CODE = _pMenuInfoRegisterEntity.RTN_KEY;
                    _pMenuInfoRegisterEntity.MODULE    = _luMODULE.GetValue();

                    MainFind_DisplayData();

                    SubFind_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);
            }
        }