Exemple #1
0
        public void DeleteCompanyEmployee(CompanyEmployee employee)
        {
            CompanyEmployee employeeToRemove = GetCompanyEmployeeByID(employee.EmployeeID);

            if (employeeToRemove == null)
            {
                return;
            }
            GetCompanyEmployees().Remove(employeeToRemove);
        }
Exemple #2
0
        public void InsertCompanyEmployee(CompanyEmployee employee)
        {
            var newEmployee = new CompanyEmployee()
            {
                EmployeeID = GetNewCompanyEmployeeID(),
                FirstName  = employee.FirstName,
                LastName   = employee.FirstName,
                Title      = employee.Title,
                Address    = employee.Address,
                BirthDate  = employee.BirthDate,
                HireDate   = employee.HireDate,
                Notes      = employee.Notes
            };

            GetCompanyEmployees().Add(newEmployee);
        }
Exemple #3
0
        public void UpdateCompanyEmployee(CompanyEmployee employee)
        {
            CompanyEmployee editableEmployee = GetCompanyEmployeeByID(employee.EmployeeID);

            if (editableEmployee == null)
            {
                return;
            }
            editableEmployee.FirstName  = employee.FirstName;
            editableEmployee.LastName   = employee.FirstName;
            editableEmployee.Title      = employee.Title;
            editableEmployee.Address    = employee.Address;
            editableEmployee.BirthDate  = employee.BirthDate;
            editableEmployee.HireDate   = employee.HireDate;
            editableEmployee.Notes      = employee.Notes;
            editableEmployee.FireDate   = employee.FireDate;
            editableEmployee.FireReason = employee.FireReason;
            editableEmployee.NewCompany = employee.NewCompany;
            editableEmployee.References = employee.References;
        }