/// <summary> /// Creates a Modify Employee form and displays the data of the employee with /// the given employeeId. /// </summary> /// <param name="employeeDA">Provides data access for a employee.</param> /// <param name="employeeId">The employeeId of the employee being modified.</param> public ModifyEmployeeForm(IEmployeeDA employeeDA, string employeeId) { InitializeComponent(); this.employeeDA = employeeDA; employee = employeeDA.GetEmployeeByEmployeeId(employeeId); txtEmployeeId.Text = employee.EmployeeId; txtFullName.Text = employee.FullName; cboDepartment.Text = employee.Department.ToString(); dtpWeekStartDate.Value = employee.WeekStart; updSalary.Value = employee.Salary; }
/// <summary> /// Creates a View Employee form and displays the data of the employee with /// the given employeeId. /// </summary> /// <param name="employeeDA">Provides data access for a employee.</param> /// <param name="employeeId">The employeeId of the employee being modified.</param> public ViewEmployeeForm(IEmployeeDA employeeDA, String employeeId) { InitializeComponent(); this.employeeDA = employeeDA; employee = employeeDA.GetEmployeeByEmployeeId(employeeId); txtEmployeeId.Text = employee.EmployeeId; txtFullName.Text = employee.FullName; txtDepartment.Text = employee.Department.ToString(); txtWeekStart.Text = employee.WeekStart.ToString("d"); txtSalary.Text = employee.Salary.ToString("c"); }
/// <summary> /// Creates a Employee Maintenance form. /// </summary> public EmployeeMaintenanceForm() { InitializeComponent(); ChooseFileForm frmChooseFile = new ChooseFileForm(); DialogResult result = frmChooseFile.ShowDialog(); if (result == DialogResult.OK) { employeeDA = frmChooseFile.ChoosenFile; this.Text = frmChooseFile.FileName; } else { employeeDA = new EmployeeBinaryFileDA(); } }
public HumanResourcesService() : base() { IEmployeeDA employeeDA; IPersonPhoneDA employeePhoneDA; if (DataMethod == 0) { employeeDA = new Data.EntityFramework.Core.EmployeeDA(); employeePhoneDA = new Data.EntityFramework.Core.PersonPhoneDA(); } else if (DataMethod == 1) { employeeDA = new Data.Dapper.Core.EmployeeDA(); employeePhoneDA = new Data.Dapper.Core.PersonPhoneDA(); } else { throw new NotImplementedException(); } EmployeeDA = employeeDA; PhoneDA = employeePhoneDA; }
/// <summary> /// Creates a Add New Employee form. /// </summary> /// <param name="employeeDA">Provides data access for a employee.</param> public AddNewEmployeeForm(IEmployeeDA employeeDA) { InitializeComponent(); this.employeeDA = employeeDA; }
public HumanResourcesService(IEmployeeDA employeeDA, IPersonPhoneDA phoneDA, IAppSettingReader appReader) : base(appReader) { EmployeeDA = employeeDA; PhoneDA = phoneDA; }
public EmployeeImpl(IEmployeeDA employee) { _employeeDA = employee; }
public EmployeeManager(IEmployeeDA _iempDa) { iempDa = _iempDa; }