using System; using System.Collections.Generic; using System.IO; using System.Linq; using BeWo.Data.Access; using BeWo.Data.Entities; using BeWo.Service.Core; using BeWo.Service.DCEntityMapper; using BeWo.Service.MessageContracts; using BS.Shared; using BS.Shared.Core; using BS.Shared.DataContracts; using BS.Shared.DataContracts.Compact; using BS.Shared.Extensions; using BS.Shared.Services; using Utils = BS.Shared.Core.Utils; namespace BeWo.Service.Plugins { public class EmployeeService : AbstractIDSpecificDefaultClass { public virtual long InsertNewEmployee(EmployeeDC pEmployeeDC) { Employee lEmployee = MapperFactory.EmployeeDC_Employee.MapToNewEntity(pEmployeeDC); DAOFactory.GenericDAO.Insert(lEmployee); return lEmployee.Oid.Value; } public virtual List GetAllActiveEmployeesCompact() { return MapperFactory.CompactEmployeeDC_Employee.MapToNewDCs(DAOFactory.GenericDAO.GetAllActive()); } public virtual List GetAllActiveAndArchivedEmployeesCompact() { return MapperFactory.CompactEmployeeDC_Employee.MapToNewDCs(DAOFactory.GenericDAO.GetAllActiveAndArchived()); } } }