Пример #1
0
 public ActionResult Edit([Bind(Include = "Id,Name,LogoUrl,Deleted")] Product product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(product));
 }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Id,Subject,Notes,Added,Due,Submitter")] Ticket ticket)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ticket).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(ticket));
 }
Пример #3
0
 public ActionResult Edit([Bind(Include = "Id,Name,Type,Email,IsActive,IsAdmin,IsHelpdesk")] User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }
Пример #4
0
 public ActionResult Edit([Bind(Include = "Id,Type")] TicketType tickettype)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tickettype).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tickettype));
 }