/// <summary> /// 通用获取列表控制器获取数据源 /// </summary> /// <param name="id">接口</param> /// <returns></returns> public ActionResult GetListData(int id) { string where = ""; //判断分公司查看权限,群组查看权限 if (id == 38 || id == 50) { if (UserEntity.UserRoleMapList.Where(m => m.RoleCode == "CES02").Count() > 0) { where = " OR (CompanyCode like '" + UserEntity.CenterCode + "%' and ComplaintLevels<>2)"; } if (UserEntity.UserRoleMapList.Where(m => m.RoleCode == "CES03").Count() > 0) { where = " OR (CompanyCode like '" + UserEntity.GroupCode + "%' and ComplaintLevels<>2)"; } if (UserEntity.UserRoleMapList.Where(m => m.RoleCode == "CES04").Count() > 0) { where = " OR 1=1"; } } PageAutoData pageAutoData = new PageAutoData(id, "", "", 0, 1, "", true, true, where); if (IsDownload()) { return(View(pageAutoData)); } else { return(pageAutoData.ToJson()); } }
public string Update(string jsonString, int interID) { PageAutoData pageAutoData = new PageAutoData(interID, "", "", false); JavaScriptSerializer js = new JavaScriptSerializer(); UpdateObjectET[] listUpdate = js.Deserialize <UpdateObjectET[]>(jsonString); return(pageAutoData.UpdateList(listUpdate)); }
/// <summary> /// 通用的获取列表控制器 /// </summary> /// <param name="id">接口ID</param> /// <returns></returns> public ActionResult GetListNoLayout(int id) { PageAutoData pageAutoData = new PageAutoData(id, "", "", false); return(View(pageAutoData)); }