Beispiel #1
0
        public IActionResult Edit(int id)
        {
            var program = _programService.GetProgram(id);

            if (program == null)
            {
                return(NotFound());
            }

            return(View(_mapper.Map <ProgramInputModel>(program)));
        }
        public ProgramPopupForm(EmployeeVO employeeVO, int prog_id = 0)
        {
            try
            {
                InitializeComponent();
                this.employeeVO = employeeVO;
                this.prog_id    = prog_id;
                this.Text       = prog_id > 0 ? "프로그램 수정" : "프로그램 등록";
                cboModule_id.ComboBinding(new ModuleService().GetModules(1), "MODULE_NAME", "MODULE_ID");

                if (prog_id > 0)
                {
                    ProgramVO programVO = programService.GetProgram(prog_id);

                    cboModule_id.SelectedValue = programVO.Module_id;
                    txtProg_name.Text          = programVO.Prog_name;
                    txtProg_form_name.Text     = programVO.Prog_form_name;
                    nudProg_seq.Value          = programVO.Prog_seq;
                    txtProg_expl.Text          = programVO.Prog_expl;

                    if (programVO.Prog_use == "Y")
                    {
                        rdoProg_useY.Checked = true;
                    }
                    else
                    {
                        rdoProg_useN.Checked = true;
                    }
                }
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
        }