// GET: Ratings/Delete public ActionResult Delete(int id) { var rp = new RatingProcess(); rp.Delete(id); return(RedirectToAction("Index")); }
// POST: Ratings/Edit public ActionResult Edit(Rating rating) { var rp = new RatingProcess(); rp.Edit(rating); return(RedirectToAction("Index")); }
// POST: Ratings/Create public ActionResult Create(Rating rating) { var rp = new RatingProcess(); rp.Insert(rating); return(RedirectToAction("Index")); }
// GET: Ratings/Rating public ActionResult Index() { var rp = new RatingProcess(); var lista = rp.SelectList(); return(View(lista)); }
// GET: Ratings/Edit public ActionResult Edit(int id) { var rp = new RatingProcess(); var rtng = rp.Find(id); return(View(rtng)); }
// GET: Ratings/Edit public ActionResult Edit(int id) { var rp = new RatingProcess(); var rtng = rp.Find(id); var cp = new ClientProcess(); var listaClient = cp.SelectList(); ViewData["Client"] = listaClient; var pp = new ProductProcess(); var listaProd = pp.SelectList(); ViewData["Product"] = listaProd; return(View(rtng)); }
// GET: Ratings/Details public ActionResult Details(int id) { var rp = new RatingProcess(); var rtng = rp.Find(id); var cp = new ClientProcess(); var descClient = cp.Find(rtng.ClientId); ViewData["Client"] = descClient.FirstName + " " + descClient.LastName; var pp = new ProductProcess(); var descProd = pp.Find(rtng.ProductId); ViewData["Product"] = descProd.Description; return(View(rtng)); }