Ejemplo n.º 1
0
 protected override object Evaluate(CommonRequest request)
 {
     using (var ctx = new SPCall())
     {
         int?            total;
         SPCallParameter sppara = null;
         if (!string.IsNullOrEmpty(request.data))
         {
             sppara = JsonConvert.DeserializeObject <SPCallParameter>(request.data);
         }
         Meeting[] rows = null;
         if (sppara != null)
         {
             rows = ctx.SP_GET_ALL_LIST <Meeting>(sppara);
             return(new
             {
                 success = true,
                 rows = rows,
                 total = sppara.total
             });
         }
         rows = ctx.SP_GET_ALL_LIST <Meeting>("", "", "", "", "", "", 0, 10, out total);
         return(new
         {
             success = true,
             rows = rows,
             total = total
         });
     }
 }
Ejemplo n.º 2
0
        protected override object Evaluate(CommonRequest parameter)
        {
            var data  = parameter.data ?? "{}";
            var input = JsonConvert.DeserializeObject <SPCallParameter>(data.ToString());

            using (var ctx = new SPCall())
            {
                input.limit = 4000;
                var spresult = ctx.SP_GET_ALL_LIST <SYS_Code>(input);
                var rows     = IEnumerableParser.Parse(spresult);
                return(new
                {
                    message = "查询成功",
                    rows,
                    success = true,
                    input.total
                });
            }
        }