public async Task <ActionResult> EditPriceChangeServices(int?idRadius, int?typeCar) { if (idRadius == null && typeCar == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var selectResult = Mapper.Map <IEnumerable <PriceListTireFittingView> >(await _priceListTireFitting.SelectId(idRadius, typeCar)).ToList(); if (selectResult == null) { return(HttpNotFound()); } var radius = await _tireRadius.GetTableAll(); // radius.ToList().Insert(0, new TireRadiusBll() { idTireRadius = 0, radius = "------"}); ViewBag.Radius = new SelectList(radius, "idTireRadius", "radius"); return(View(selectResult)); }
// GET: TireStorage/Create public async Task <ActionResult> CreateTireStorageOrder(int?IdClient, int?stockNumber = null) { if (IdClient != null) { ClientsOfCarWashView clientList = Mapper.Map <ClientsOfCarWashView>(await _clientsOfCarWash.GetId(IdClient)); ViewBag.Client = clientList; ViewBag.StockNumber = stockNumber; ViewBag.Radius = Mapper.Map <IEnumerable <TireRadiusView> >(await _tireRadius.GetTableAll()).ToList(); TempData["Client"] = clientList; return(View()); } return(RedirectToRoute(new { controller = "Order", action = "Index" })); }