public async Task <IActionResult> CheckOutDeviceAsync(SelectEmployeeModel model) { ReturnUrl = HttpContext.Request.Headers["Referer"]; await _checkouts.CheckOutDevices(model.SelectedEmployeeId, model.DeviceId); return(Redirect(ReturnUrl)); }
// Выбрать сотрудника public async Task <IActionResult> SelectEmployeeAsync(int deviceId) { var employees = await _employees.GetEmployeesAsync(); var model = new SelectEmployeeModel { Employees = employees.ToArray(), DeviceId = deviceId }; return(PartialView(model)); }