Exemple #1
0
 public ActionResult Edit([Bind(Include = "Id,Login,Email,Password,UserRoleId")] UserSys userSys)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userSys).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(userSys));
 }
 public ActionResult Edit([Bind(Include = "Id,Name")] Gender gender)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gender).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(gender));
 }
Exemple #3
0
 public ActionResult Edit([Bind(Include = "Id,Name,Phone,GenderId,CityId,RegionId,LastPurchase,ClassificationId,UserId")] Customer customer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(customer).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(customer));
 }
Exemple #4
0
 public ActionResult Edit([Bind(Include = "Id,Name,RegionId")] City city)
 {
     if (ModelState.IsValid)
     {
         db.Entry(city).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.RegionId = new SelectList(db.Region, "Id", "Name", city.RegionId);
     return(View(city));
 }