Exemplo n.º 1
0
        public SingleApiResponse GetList(RoleGetListRequest req)
        {
            var result = RoleRepo.GetList <SS_ROLE>(req);

            return(new SingleApiResponse()
            {
                Data = result
            });
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public BasicResponse <List <RoleInfo> > GetRoleList(RoleGetListRequest rolerequest)
 {
     return(_roleService.GetRoleList(rolerequest));
 }
Exemplo n.º 5
0
 public SingleApiResponse GetList([FromBody] RoleGetListRequest req)
 {
     return(IRoleBiz.GetList(req));
 }
Exemplo n.º 6
0
        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));
        }