public ActionResult GetById(int id) { ImageManageBLL bll = new ImageManageBLL(); var model = bll.GetById(id); return(Json(new { success = true, models = model }, JsonRequestBehavior.AllowGet)); }
public ActionResult Save(ImageManageViewModel mode) { ImageManageBLL bll = new ImageManageBLL(); string msg = string.Empty; bool b = bll.Save(mode, out msg); return(Json(new { success = b, message = msg }, JsonRequestBehavior.AllowGet)); }
public ActionResult Delete(int id, string fileName) { ImageManageBLL bll = new ImageManageBLL(); bool b = bll.Detele(id); string PhysicalPath = Server.MapPath("/ImageManage/"); deleteFile(PhysicalPath + fileName); return(Json(new { success = b }, JsonRequestBehavior.AllowGet)); }
public ActionResult SearchImage(ImageManageViewModel model) { model.page = int.Parse(Request["page"]); model.rows = int.Parse(Request["rows"]); ImageManageBLL bll = new ImageManageBLL(); ImageManageList list = bll.getList(model); return(Json(list, JsonRequestBehavior.AllowGet)); }