Exemple #1
0
 public bool SaveApplication(ApplicationVO applicationVO)
 {
     using (ApplicationDAC applicationDAC = new ApplicationDAC())
     {
         return(applicationDAC.SaveApplication(applicationVO));
     }
 }
        public ApplicationPopupForm(EmployeeVO employeeVO, int app_id = 0)
        {
            try
            {
                InitializeComponent();
                this.employeeVO = employeeVO;
                this.app_id     = app_id;
                this.Text       = app_id > 0 ? "어플리케이션 수정" : "어플리케이션 등록";

                if (app_id > 0)
                {
                    ApplicationVO applicationVO = applicationService.GetApplication(app_id);

                    txtApp_name.Text = applicationVO.App_name;
                    nudApp_seq.Value = applicationVO.App_seq;

                    if (applicationVO.App_use == "Y")
                    {
                        rdoApp_useY.Checked = true;
                    }
                    else
                    {
                        rdoApp_useN.Checked = true;
                    }
                }
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
        }
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.HasEmptyTxt())
                {
                    return;
                }

                ApplicationVO applicationVO = new ApplicationVO
                {
                    App_id          = app_id,
                    App_name        = txtApp_name.Text.Trim(),
                    App_seq         = (int)nudApp_seq.Value,
                    App_use         = rdoApp_useY.Checked ? "Y" : "N",
                    Regist_employee = employeeVO.Employee_id
                };

                if (applicationService.SaveApplication(applicationVO))
                {
                    MessageBox.Show("정상적으로 저장되었습니다.");
                    this.DialogResult = DialogResult.OK;
                    this.Close();
                }
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
        }
 public bool SaveApplication(ApplicationVO applicationVO)
 {
     return(NotSelectSPJ <ApplicationVO>("SP_SAVE_APPLICATION", applicationVO, "App_id", "App_name", "App_seq", "App_use", "Regist_employee"));
 }