Exemplo n.º 1
0
 public ActionResult SuaBrand(Brand p, string name)
 {
     if (ModelState.IsValid)
     {
         QuanLy ql = new QuanLy();
         ql.UpdateBrand(p.ID, name);
         __db.Entry(p).State = EntityState.Modified;
         __db.SaveChanges();
         ViewBag.IDBrand = new SelectList(__db.Brands, "ID", "Name", p.ID);
         return(RedirectToAction("Brand"));
     }
     return(View(p));
 }