예제 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            //신규 폼 열기
            EmployeeUpdateInfoForm employeeUpdateInfoForm = new EmployeeUpdateInfoForm();

            employeeUpdateInfoForm.ShowDialog();

            employeeBindingSource.DataSource = Dao.Employee.GetWithDepartmentAndPositionName();
        }
예제 #2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            //포커스된 데이터 확인
            Employee employee = employeeBindingSource.Current as Employee;

            if (employee == null)
            {
                return;
            }

            //포커스된 데이터를 바탕으로 정보 전달
            EmployeeUpdateInfoForm employeeUpdateInfoForm = new EmployeeUpdateInfoForm(employee);

            employeeUpdateInfoForm.ShowDialog();

            employeeBindingSource.DataSource = Dao.Employee.GetWithDepartmentAndPositionName();
        }