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 })); }
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")); }
public ActionResult Update(Editor edtUpt) { edtUpt.CreateDate = DateTime.Now; _rep.Update(edtUpt); return(RedirectToAction("EditorList")); }