public ActionResult Edit(ProjectType ptype)
 {
     if (ModelState.IsValid)
     {
         context.Entry(ptype).State = EntityState.Modified;
         context.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(ptype));
 }
示例#2
0
 public ActionResult Edit(Label label)
 {
     if (ModelState.IsValid)
     {
         context.Entry(label).State = EntityState.Modified;
         context.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(label));
 }
示例#3
0
        public ActionResult Edit(Client client)
        {
            if (ModelState.IsValid)
            {
                var image = WebImage.GetImageFromRequest("UploadedImage");

                if (image != null)
                {
                    client.MainImage = Server.MapPath("/Images/Clients/").SaveImage(image);
                }

                context.Entry(client).State = EntityState.Modified;
                context.SaveChanges();
                return(RedirectToAction("Index"));
            }
            return(View(client));
        }