Example #1
0
 public ActionResult UpdateProfile(Editor item, HttpPostedFileBase resim)
 {
     if (resim != null)
     {
         item.ImagePath = ImageUploader.UploadImage("~/Pictures", resim);
     }
     editor_repo.Update(item);
     return(RedirectToAction("EditorProfile", new { id = (Session["editor"] as Editor).ID }));
 }
Example #2
0
 public ActionResult UpdateEditor(Editor item, HttpPostedFileBase resim)
 {
     if (resim != null)
     {
         item.ImagePath = ImageUploader.UploadImage("~/Pictures/Users", resim);
     }
     if (editor_repo.Any(x => x.Password != item.Password))
     {
         item.Password = Crypto.HashPassword(item.Password);
     }
     item.ModifiedBy = (Session["admin"] as AppUser).UserName;
     editor_repo.Update(item);
     return(RedirectToAction("ListEditor"));
 }
Example #3
0
 public ActionResult Update(Editor edtUpt)
 {
     edtUpt.CreateDate = DateTime.Now;
     _rep.Update(edtUpt);
     return(RedirectToAction("EditorList"));
 }