public ActionResult Edit(tbl_Gallery obj) { obj.ModifiedBy = User.ID; obj.ModifiedDate = DateTime.Now; try { _GalleryRepository.Edit(obj); return(Json(new { IsSuccess = true, Messenger = "Cập nhật slide ảnh thành công", }, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(new { IsSuccess = false, Messenger = string.Format("Cập nhật slide ảnh thất bại") }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Add(tbl_Gallery obj) { obj.CreatedDate = DateTime.Now; obj.CreatedBy = User.ID; try { _GalleryRepository.Add(obj); return(Json(new { IsSuccess = true, Messenger = "Thêm mới ảnh slide thành công", }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { IsSuccess = false, Messenger = string.Format("Thêm mới ảnh slide thất bại") }, JsonRequestBehavior.AllowGet)); } }