public async Task DropDownListView() { var getStaff = await _carWashWorkers.GetStaffAll(); ViewBag.CarWashWorkers = new SelectList((from s in getStaff select new { id = s.id, FullName = s.Surname + " " + s.Name + " " + s.Patronymic }), "id", "FullName", null); ViewBag.Category = new SelectList(await _expenseCategory.GetTableAll(), "idExpenseCategory", "name"); }
// GET: CarWashWorkersViews/Create public async Task <ActionResult> AddEmployee() { var carWashWorkersViewsGet = Mapper.Map <IEnumerable <CarWashWorkersView> >(await _services.GetStaffAll()); ViewBag.Status = "true"; ViewBag.Job = new SelectList(await _job.SelectJobTitle(), "Id", "Position"); return(View()); }
// GET: Credit/Create public async Task <ActionResult> Create() { ViewBag.CarWashWorkersId = new SelectList(await _carWashWorkers.GetStaffAll(), "id", "Name", "Surname"); return(View()); }