public ActionResult Edit(Category category)
 {
     if (ModelState.IsValid)
     {
         db.Entry(category).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(category));
 }
Ejemplo n.º 2
0
 public ActionResult Edit(School school)
 {
     if (ModelState.IsValid)
     {
         db.Entry(school).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(school));
 }
Ejemplo n.º 3
0
 public ActionResult Edit(FrontPage frontpage)
 {
     if (ModelState.IsValid)
     {
         db.Entry(frontpage).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(frontpage));
 }
 public ActionResult Edit(Product product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CategoryId = new SelectList(db.Categories, "CategoryId", "CategoryName", product.CategoryId);
     return(View(product));
 }
Ejemplo n.º 5
0
 public ActionResult Edit(Order order)
 {
     if (ModelState.IsValid)
     {
         db.Entry(order).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserId = new SelectList(db.UserProfiles, "UserId", "UserName", order.UserId);
     return(View(order));
 }
Ejemplo n.º 6
0
 public ActionResult Edit(UserProfile userprofile)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userprofile).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.SchoolId = new SelectList(db.Schools, "SchoolId", "SchoolName", userprofile.SchoolId);
     return(View(userprofile));
 }
Ejemplo n.º 7
0
 public ActionResult Edit(OrderDetail orderdetail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(orderdetail).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProductId = new SelectList(db.Products, "ProductId", "ProductName", orderdetail.ProductId);
     ViewBag.OrderId   = new SelectList(db.Orders, "OrderId", "UserName", orderdetail.OrderId);
     return(View(orderdetail));
 }
 public ActionResult Edit(ActivityTransaction activitytransaction)
 {
     if (ModelState.IsValid)
     {
         db.Entry(activitytransaction).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserId     = new SelectList(db.UserProfiles, "UserId", "UserName", activitytransaction.UserId);
     ViewBag.ActivityId = new SelectList(db.Activities, "ActivityId", "ActivityName", activitytransaction.ActivityId);
     return(View(activitytransaction));
 }