// GET: Dealers/Edit public ActionResult Edit(int id) { var dp = new DealerProcess(); var dealer = dp.Find(id); return(View(dealer)); }
// GET: Dealers/Delete public ActionResult Delete(int id) { var cp = new DealerProcess(); cp.Delete(id); return(RedirectToAction("Index")); }
// POST: Dealers/Create public ActionResult Create(Dealer dealer) { var dp = new DealerProcess(); dp.Insert(dealer); return(RedirectToAction("Index")); }
// GET: Dealers/Dealer public ActionResult Index() { var dp = new DealerProcess(); var lista = dp.SelectList(); return(View(lista)); }
// POST: Dealers/Edit public ActionResult Edit(Dealer dealer) { var dp = new DealerProcess(); dp.Edit(dealer); return(RedirectToAction("Index")); }
// GET: Dealers/Details public ActionResult Details(int id) { var dp = new DealerProcess(); var pais = dp.Find(id); return(View(pais)); }
// GET: Products/Create public ActionResult Create() { var dp = new DealerProcess(); var lista = dp.SelectList(); ViewData["Dealer"] = lista; return(View()); }
// GET: Dealer/Edit/5 public ActionResult Edit(int id) { var category = new CategoryProcess().SelectList(); var country = new CountryProcess().SelectList(); ViewBag.Category = new SelectList(category, "Id", "Name", id); ViewBag.Country = new SelectList(country, "Id", "Name", id); var cp = new DealerProcess(); return(View(cp.findDealer(id))); }
// GET: Products/Edit public ActionResult Edit(int id) { var pp = new ProductProcess(); var prd = pp.Find(id); var dp = new DealerProcess(); var lista = dp.SelectList(); ViewData["Dealer"] = lista; return(View(prd)); }
public ActionResult Index() { var pp = new ProductProcess(); var lista = pp.SelectList(); var dp = new DealerProcess(); var listadealer = dp.SelectList(); ViewData["Dealer"] = listadealer; return(View(lista)); }
// GET: Products/Details public ActionResult Details(int id) { var pp = new ProductProcess(); var prd = pp.Find(id); var dp = new DealerProcess(); var descDealer = dp.Find(prd.DealerId); ViewData["Dealer"] = descDealer.FirstName + " " + descDealer.LastName; return(View(prd)); }
//public void DealerListRemove() //{ // _cacheServices.Remove(DataCacheSetting.Dealer.Key); // var lista = _cacheServices.GetOrAdd( // DataCacheSetting.Dealer.Key, // () => // { // var dp = new DealerProcess(); // return dp.SelectList(); // }, // DataCacheSetting.Dealer.SlidingExpiration); //} public void DealerListRemoveDTO() { _cacheServices.Remove(DataCacheSetting.DealerDTO.Key); var lista = _cacheServices.GetOrAdd( DataCacheSetting.DealerDTO.Key, () => { var dp = new DealerProcess(); return(dp.SelectList()); }, DataCacheSetting.DealerDTO.SlidingExpiration); }
public ActionResult Delete(int id, Dealer dealer) { try { var cp = new DealerProcess(); cp.deleteDealer(id); DataCache.Instance.DealerListRemoveDTO(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Edit(Dealer dealer) { try { var cp = new DealerProcess(); cp.editDealer(dealer); DataCache.Instance.DealerListRemoveDTO(); return(RedirectToAction("Index")); } catch { return(View()); } }
// GET: Dealers/Dealer public ActionResult Index() { var dp = new DealerProcess(); var lista = dp.SelectList(); var cp = new CountryProcess(); var listaCountry = cp.SelectList(); ViewData["Country"] = listaCountry; var cp2 = new CategoryProcess(); var listaCategory = cp2.SelectList(); ViewData["Category"] = listaCategory; return(View(lista)); }
// GET: Dealers/Edit public ActionResult Edit(int id) { var dp = new DealerProcess(); var dealer = dp.Find(id); var cp = new CountryProcess(); var listaCountry = cp.SelectList(); ViewData["Country"] = listaCountry; var cp2 = new CategoryProcess(); var listaCategory = cp2.SelectList(); ViewData["Category"] = listaCategory; return(View(dealer)); }
// GET: Dealers/Details public ActionResult Details(int id) { var dp = new DealerProcess(); var dealer = dp.Find(id); var cp = new CountryProcess(); var nameCountry = cp.Find(dealer.CountryId); ViewData["Country"] = nameCountry.Name; var cp2 = new CategoryProcess(); var nameCategory = cp2.Find(dealer.CategoryId); ViewData["Category"] = nameCategory.Name; return(View(dealer)); }
// GET: Dealer/Delete/5 public ActionResult Delete(int id) { var cp = new DealerProcess(); return(View(cp.findDealer(id))); }