Beispiel #1
0
        public ActionResult New()
        {
            Requsition requsitions = new Requsition();
            var        employee    = _employeeManager.GetAll();
            var        requsition  = _requsitionManager.GetAllByNull(requsitions.Status = null);

            List <RequsitionViewModel> requsitionViewModels = new List <RequsitionViewModel>();

            foreach (var data in requsition)
            {
                var requsitionVM = new RequsitionViewModel()
                {
                    Id           = data.Id,
                    Form         = data.Form,
                    To           = data.To,
                    Description  = data.Description,
                    JourneyStart = data.JourneyStart,
                    JouneyEnd    = data.JouneyEnd,
                    Employee     = employee.Where(x => x.Id == data.EmployeeId).FirstOrDefault()
                };
                requsitionViewModels.Add(requsitionVM);
            }
            return(View(requsitionViewModels));
        }//details