Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "Id,Title,CreatedOn,Active,Notes")] RSOrder rsorder)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rsorder).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(rsorder));
 }
Ejemplo n.º 2
0
        public async Task <ActionResult> Edit(RSProduct rSProduct)
        {
            if (ModelState.IsValid)
            {
                db.Entry(rSProduct).State = System.Data.Entity.EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(rSProduct));
        }
Ejemplo n.º 3
0
        public async Task <ActionResult> Edit(RSNavigationItem rSNavigationItem, int productid)
        {
            if (ModelState.IsValid)
            {
                db.Entry(rSNavigationItem).State = EntityState.Modified;
                await db.SaveChangesAsync();

                rSNavigationItem             = db.Navigation.Find(rSNavigationItem.Id);
                rSNavigationItem.ProductLink = await db.Products.FindAsync(productid);

                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(rSNavigationItem));
        }
Ejemplo n.º 4
0
        public async Task <ActionResult> Edit(RSUser user, string newpassword, string confirmpassword)
        {
            if (ModelState.IsValid)
            {
                db.Entry(user).State = EntityState.Modified;
                if (!string.IsNullOrWhiteSpace(newpassword) & newpassword == confirmpassword)
                {
                    user.DependencyInjection();
                    user.CreatePassword(newpassword);
                }

                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(user));
        }