コード例 #1
0
        private void btnNewEmployee_Click(object sender, EventArgs e)
        {
            // 신규 사원 입력 UI 생성.
            var frmEmpSetting = new FrmEmployeeSetting();

            frmEmpSetting.IsNewEmployee = true;
            frmEmpSetting.RankInfo      = _lstRank;
            frmEmpSetting.TeamInfo      = _lstTeam;
            frmEmpSetting.ProjectInfo   = _lstProject;
            frmEmpSetting.CodeInfo      = _lstCodeCommon;

            if (frmEmpSetting.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                // UI 결과가 등록/수정 인경우 직원 정보 갱신하여 화면에 뿌려줌. 취소는 작업없음.
                InitControl();
                btnSearch_Click(null, null);
            }
        }
コード例 #2
0
        private void UpdateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var empId = gridResult.SelectedRows[0].Cells[1].Value.ToString();

            var emp = _lstEmployeeTotal.Where(o => o.empId.Equals(empId)).FirstOrDefault();

            if (emp != null)
            {
                // 신규 사원 입력 UI 생성.
                var frmEmpSetting = new FrmEmployeeSetting();
                frmEmpSetting.IsNewEmployee  = false;
                frmEmpSetting.RankInfo       = _lstRank;
                frmEmpSetting.TeamInfo       = _lstTeam;
                frmEmpSetting.ProjectInfo    = _lstProject;
                frmEmpSetting.UpdateEmployee = emp;

                if (frmEmpSetting.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    InitControl();
                    btnSearch_Click(null, null);
                }
            }
        }