Пример #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 File_Delete()
        {
            try
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor);

                //GridView gv = _gdMAIN_VIEW as GridView;

                bool isError = false;
                //if (gv.GetFocusedValue() != null)
                //{
                _pucPartDocumentListPopup_T02Entity.CRUD          = "U";
                _pucPartDocumentListPopup_T02Entity.DOCUMENT_ID   = _gdSUB_VIEW.GetFocusedRowCellValue("DOCUMENT_ID").ToString();
                _pucPartDocumentListPopup_T02Entity.DOCUMENT_TYPE = _luDOCUMENT_TYPE.GetValue().ToString();
                _pucPartDocumentListPopup_T02Entity.PART_CODE     = _gdSUB_VIEW.GetFocusedRowCellValue("PART_CODE").ToString();
                _pucPartDocumentListPopup_T02Entity.SEQ           = _gdSUB_VIEW.GetFocusedRowCellValue("SEQ").ToString();
                _pucPartDocumentListPopup_T02Entity.FILE_NAME_1   = ""; //_gdSUB_VIEW.GetFocusedRowCellValue("FILE_NAME_1").ToString();
                _pucPartDocumentListPopup_T02Entity.FILE_NAME_2   = ""; //_gdSUB_VIEW.GetFocusedRowCellValue("FILE_NAME_2").ToString();
                _pucPartDocumentListPopup_T02Entity.EXTENSION     = ""; //_gdSUB_VIEW.GetFocusedRowCellValue("EXTENSION").ToString();
                _pucPartDocumentListPopup_T02Entity.USE_YN        = _gdSUB_VIEW.GetFocusedRowCellValue("USE_YN").ToString();
                _pucPartDocumentListPopup_T02Entity.REMARK        = _gdSUB_VIEW.GetFocusedRowCellValue("REMARK").ToString();

                //}

                isError = new ucPartDocumentListPopup_T02Business().Document_File_Delete(_pucPartDocumentListPopup_T02Entity);

                string strFTP_PATH = "";

                if (isError)
                {
                    //오류 발생.
                    CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_DELETE_ERROR);
                }
                else
                {
                    //정상 처리
                    strFTP_PATH = string.Format(@"{0}{1}/{2}/", _pucPartDocumentListPopup_T02Entity.FTP_PATH, "FILE_DATA", _luDOCUMENT_TYPE.GetValue().ToString());

                    string qFileName = _pucPartDocumentListPopup_T02Entity.FILE_NAME_2;
                    string qPath     = strFTP_PATH;

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

                    CoFAS_DevExpressManager.ShowInformationMessage(_pMSG_DELETE);

                    _pucPartDocumentListPopup_T02Entity.CRUD          = "R";
                    _pucPartDocumentListPopup_T02Entity.DOCUMENT_TYPE = _luDOCUMENT_TYPE.Text.ToString();
                    //_pucPartDocumentListPopup_T02Entity.DOCUMENT_NAME = _luDOCUMENT_NAME.Text.ToString();
                    //_pucPartDocumentListPopup_T02Entity.DOCUMENT_VER = _luDOCUMENT_VER.Text.ToString();
                    _pucPartDocumentListPopup_T02Entity.USE_YN = _luUSE_YN.GetValue();
                    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);
            }
        }