public ActionResult Edit([Bind(Include = "sup_id,sup_name,sup_address,sup_phone,sup_openingBalance")] supplier supplier)
 {
     if (ModelState.IsValid)
     {
         db.Entry(supplier).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(supplier));
 }
 public ActionResult Edit([Bind(Include = "ISBN_Code,Book_Title,Author,Publication,Publication_year")] Book book)
 {
     if (ModelState.IsValid)
     {
         db.Entry(book).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(book));
 }
Esempio n. 3
0
 public ActionResult Edit([Bind(Include = "r_id,r_name,r_status")] role role)
 {
     if (ModelState.IsValid)
     {
         db.Entry(role).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(role));
 }
 public ActionResult Edit([Bind(Include = "cat_id,cat_name,cat_status")] category category)
 {
     if (ModelState.IsValid)
     {
         db.Entry(category).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(category));
 }
Esempio n. 5
0
 public ActionResult Edit([Bind(Include = "u_id,u_name,u_username,u_password,u_phone,u_email,u_status,u_roleID")] user user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.u_roleID = new SelectList(db.roles, "r_id", "r_name", user.u_roleID);
     return(View(user));
 }