public SingleApiResponse GetList(RoleGetListRequest req) { var result = RoleRepo.GetList <SS_ROLE>(req); return(new SingleApiResponse() { Data = result }); }
public IEnumerable <T> GetList <T>(RoleGetListRequest req) where T : class { var client = DBProxy.CreateClient(); var sql = new StringBuilder(@"SELECT * FROM SS_ROLE sr WHERE 1 = 1 "); var param = new DynamicParameters(); if (!string.IsNullOrEmpty(req.R_NAME)) { sql.Append(" AND sr.R_NAME LIKE @R_NAME"); param.Add("@R_NAME", $"%{req.R_NAME}%"); } sql.Append(" ORDER BY sr.R_ORDERID"); return(client.Query <T>(sql.ToString(), param)); }
public BasicResponse <List <RoleInfo> > GetRoleList(RoleGetListRequest rolerequest) { var roleresponse = new BasicResponse <List <RoleInfo> >(); rolerequest.PagerInfo.PageIndex = rolerequest.PagerInfo.PageIndex - 1; if (rolerequest.PagerInfo.PageIndex < 0) { rolerequest.PagerInfo.PageIndex = 0; } int rowcount = 0; var roleModelLists = _Repository.GetRoleList(rolerequest.PagerInfo.PageIndex, rolerequest.PagerInfo.PageSize, out rowcount); var roleInfoLists = new List <RoleInfo>(); foreach (var item in roleModelLists) { var RoleInfo = ObjectConverter.Copy <RoleModel, RoleInfo>(item); roleInfoLists.Add(RoleInfo); } roleresponse.Data = roleInfoLists; return(roleresponse); }
public BasicResponse <List <RoleInfo> > GetRoleList(RoleGetListRequest rolerequest) { return(_roleService.GetRoleList(rolerequest)); }
public SingleApiResponse GetList([FromBody] RoleGetListRequest req) { return(IRoleBiz.GetList(req)); }
public BasicResponse <List <RoleInfo> > GetRoleList(RoleGetListRequest rolerequest) { var responseStr = HttpClientHelper.Post(Webapi + "/v1/Role/GetPageList?token=" + Token, JSONHelper.ToJSONString(rolerequest)); return(JSONHelper.ParseJSONString <BasicResponse <List <RoleInfo> > >(responseStr)); }