Ejemplo n.º 1
0
        private void InitializeButtons()
        {
            try
            {
                MainFormButtonSetting pButtonSetting = new MainFormButtonSetting();

                pButtonSetting.UseYNSearchButton  = _pMenuSettingEntity.MENU_SEARCH == "Y" ? true : false;  // 조회
                pButtonSetting.UseYNExportButton  = _pMenuSettingEntity.MENU_EXPORT == "Y" ? true : false;  // 내보내기
                pButtonSetting.UseYNImportButton  = _pMenuSettingEntity.MENU_IMPORT == "Y" ? true : false;  // 가져오기
                pButtonSetting.UseYNPrintButton   = _pMenuSettingEntity.MENU_PRINT == "Y" ? true : false;   // 프린터
                pButtonSetting.UseYNSaveButton    = _pMenuSettingEntity.MENU_SAVE == "Y" ? true : false;    // 저장
                pButtonSetting.UseYNAddItemButton = _pMenuSettingEntity.MENU_ADDITEM == "Y" ? true : false; // 신규
                pButtonSetting.UseYNDeleteButton  = _pMenuSettingEntity.MENU_DELETE == "Y" ? true : false;  // 삭제

                pButtonSetting.UseYNInitialButton   = true;                                                 // 초기화
                pButtonSetting.UseYNSettingButton   = false;                                                // 설정
                pButtonSetting.UseYNFormCloseButton = true;                                                 // 폼닫기

                if (_pUSER_GRANT == "PC160001")
                {
                    pButtonSetting.UseYNSettingButton = true; // 설정
                }
                else
                {
                    pButtonSetting.UseYNSettingButton = false; // 설정
                }


                MainForm.SetButtonSetting(pButtonSetting);
            }
            catch (ExceptionManager pExceptionManager)
            {
                CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString()));
            }
        }
Ejemplo n.º 2
0
        private void InitializeButtons()
        {
            try
            {
                MainFormButtonSetting pButtonSetting = new MainFormButtonSetting();

                pButtonSetting.UseYNSearchButton  = _pMenuSettingEntity.MENU_SEARCH == "Y" ? true : false;  // 조회
                pButtonSetting.UseYNExportButton  = _pMenuSettingEntity.MENU_EXPORT == "Y" ? true : false;  // 내보내기
                pButtonSetting.UseYNImportButton  = _pMenuSettingEntity.MENU_IMPORT == "Y" ? true : false;  // 가져오기
                pButtonSetting.UseYNPrintButton   = _pMenuSettingEntity.MENU_PRINT == "Y" ? true : false;   // 프린터
                pButtonSetting.UseYNSaveButton    = _pMenuSettingEntity.MENU_SAVE == "Y" ? true : false;    // 저장
                pButtonSetting.UseYNAddItemButton = _pMenuSettingEntity.MENU_ADDITEM == "Y" ? true : false; // 신규
                pButtonSetting.UseYNDeleteButton  = _pMenuSettingEntity.MENU_DELETE == "Y" ? true : false;  // 삭제

                pButtonSetting.UseYNInitialButton   = true;                                                 // 초기화
                pButtonSetting.UseYNSettingButton   = false;                                                // 설정
                pButtonSetting.UseYNFormCloseButton = true;                                                 // 폼닫기

                MainForm.SetButtonSetting(pButtonSetting);

                //버튼이벤트 생성
                SearchButtonClicked  += new EventHandler(Form_SearchButtonClicked);
                SaveButtonClicked    += new EventHandler(Form_SaveButtonClicked);
                AddItemButtonClicked += new EventHandler(Form_AddItemButtonClicked);
                DeleteButtonClicked  += new EventHandler(Form_DeleteButtonClicked);
                PrintButtonClicked   += new EventHandler(Form_PrintButtonClicked);
                ExportButtonClicked  += new EventHandler(Form_ExportButtonClicked);
                ImportButtonClicked  += new EventHandler(Form_ImportButtonClicked);
                InitialButtonClicked += new EventHandler(Form_InitialButtonClicked);
                SettingButtonClicked += new EventHandler(Form_SettingButtonClicked);

                FormCloseButtonClicked += new EventHandler(Form_FormCloseButtonClicked);
            }
            catch (ExceptionManager pExceptionManager)
            {
                CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager));
            }
        }