public ActionResult EditCustomer([Bind(Include = "CusName,Password,FullName,BirthDay,Gender,Email,Phone,Address")] Customer customer) { if (ModelState.IsValid) { db.Entry(customer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("ThanksEdit", "Customers")); } return(View(customer)); }
public ActionResult EditBrand([Bind(Include = "BrandID,BrandName,Description")] Brand brand) { if (ModelState.IsValid) { dbwatch.Entry(brand).State = EntityState.Modified; dbwatch.SaveChanges(); return(RedirectToAction("ViewBrand")); } return(View(brand)); }
public ActionResult Edit([Bind(Include = "CateID,CateName")] Category category) { if (ModelState.IsValid) { db.Entry(category).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category)); }
public ActionResult Edit([Bind(Include = "OrderID,CusName,Date,Payment,Status")] Order order) { if (ModelState.IsValid) { db.Entry(order).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CusName = new SelectList(db.Customer, "CusName", "Password", order.CusName); return(View(order)); }
public ActionResult Edit([Bind(Include = "FBackID,Title,Content,Status,CusName")] FeedBack feedBack) { if (ModelState.IsValid) { db.Entry(feedBack).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CusName = new SelectList(db.Customers, "CusName", "Password", feedBack.CusName); return(View(feedBack)); }
public ActionResult Edit([Bind(Include = "ProID,ProName,CateID,Price,Specials,Description,Origin,Image,BrandID")] Product product) { if (ModelState.IsValid) { db.Entry(product).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.BrandID = new SelectList(db.Brands, "BrandID", "BrandName", product.BrandID); ViewBag.CateID = new SelectList(db.Categories, "CateID", "CateName", product.CateID); return(View(product)); }
// GET: FeedBacks/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } FeedBack feedBack = db.FeedBacks.Find(id); if (feedBack == null) { return(HttpNotFound()); } else { feedBack.Status = false; db.Entry(feedBack).State = EntityState.Modified; db.SaveChanges(); } ViewBag.tt = feedBack; return(View()); }