Ejemplo n.º 1
0
        public ActionResult GetWithPay()
        {
            IEnumerable <IPermEmployee> permEmp = _empOps.GetPermEmployees(true);
            IEnumerable <IEmployee>     tempEmp = _empOps.GetTempEmployees(true);

            var allEmp = new List <GetEmployeeWithPayViewModel>();

            permEmp.ToList().ForEach(x =>
            {
                x.TotalPay = x.CalculatePay();
                allEmp.Add(empFactory.GetEmployeeWithPayVMFromEmployee(x, true));
            });

            tempEmp.ToList().ForEach(x =>
            {
                x.TotalPay = x.CalculatePay();
                allEmp.Add(empFactory.GetEmployeeWithPayVMFromEmployee(x));
            });

            return(View(allEmp));
        }