public ActionResult GetAllEntities() { OperateResult or = CompanyRegisterManager.GetAll(); if (or.status == OperateStatus.Success && or.data != null) { return(Json(or.data, JsonRequestBehavior.AllowGet)); } return(Json(or, JsonRequestBehavior.AllowGet)); }
public ActionResult GetEntities(Pager pager) { OperateResult or = CompanyRegisterManager.GetByPager(new QueryParam { pager = pager }); if (or.status == OperateStatus.Success && or.data != null) { return(Json(or.data, JsonRequestBehavior.AllowGet)); } return(Json(or, JsonRequestBehavior.AllowGet)); }
public ActionResult Delete(int?id) { if (id == null) { return(Json( new OperateResult { content = "访问错误", }, JsonRequestBehavior.AllowGet )); } OperateResult or = CompanyRegisterManager.Remove(id.Value); return(Json(or, JsonRequestBehavior.AllowGet)); }
public ActionResult Edit(int?id) { if (id == null) { return(Json( new OperateResult { content = "访问错误", }, JsonRequestBehavior.AllowGet )); } OperateResult or = CompanyRegisterManager.GetById(id.Value); return(View(or.data)); }