Пример #1
0
 public ActionResult Edit(Project project)
 {
     if (ModelState.IsValid)
     {
         AdminDb.Entry(project).State = EntityState.Modified;
         AdminDb.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(project));
 }
Пример #2
0
 public ActionResult Edit(CmsPage cmspage)
 {
     if (ModelState.IsValid)
     {
         AdminDb.Entry(cmspage).State = EntityState.Modified;
         AdminDb.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cmspage));
 }
Пример #3
0
 public ActionResult Edit([Bind(Include = "Id,Name,StreetNumber,Zip,City,Region,Default,Invoice,CreatedAt,ModifiedAt")] AddressBook addressbook)
 {
     if (ModelState.IsValid)
     {
         AdminDb.Entry(addressbook).State = EntityState.Modified;
         AdminDb.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(addressbook));
 }
Пример #4
0
 public ActionResult Edit(User user)
 {
     if (ModelState.IsValid)
     {
         AdminDb.Entry(user).State = EntityState.Modified;
         AdminDb.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Id = new SelectList(AdminDb.UserProfiles, "Id", "Description", user.Id);
     return(View(user));
 }
Пример #5
0
 public ActionResult Edit(OrderProduct orderproduct)
 {
     if (ModelState.IsValid)
     {
         AdminDb.Entry(orderproduct).State = EntityState.Modified;
         AdminDb.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DeliveryAddressId = new SelectList(AdminDb.AddressBook, "Id", "Name", orderproduct.ShippingAddress.Id);
     ViewBag.BillingAddressId  = new SelectList(AdminDb.AddressBook, "Id", "Name", orderproduct.BillingAddress.Id);
     return(View(orderproduct));
 }
Пример #6
0
 public ActionResult EditUserRole(UserRoleSetting model)
 {
     try
     {
         if (ModelState.IsValid)
         {
             adminDb.UserRoleSettings.Attach(model);
             adminDb.Entry(model).State = EntityState.Modified;
             adminDb.SaveChanges();
         }
         return(RedirectToAction("UserRoleSetting"));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }