Beispiel #1
0
        /// <summary>
        /// 获取规则图文列表
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private static string GetImageList(HttpContext context)
        {
            var data = bll.GetList <WeixinReplyRuleImgsInfo>(string.Format("RuleID='{0}'", context.Request["UID"]));

            if (data.Count > 0)
            {
                return(string.Format("[{0}]", ZentCloud.Common.JSONHelper.ListToJson <WeixinReplyRuleImgsInfo>(data, ",")));
            }
            return("");
        }
        /// <summary>
        /// 根据条件获取数据
        /// </summary>
        private static string GetAllByAny(HttpContext context)
        {
            //if (!_isview)
            //{
            //    return null;
            //}
            var userid = Comm.DataLoadTool.GetCurrUserID();

            if (string.IsNullOrEmpty(userid))
            {
                return("请重新登录");
            }
            string flowid = context.Request["FlowID"];
            //if (bll.Get<WXFlowInfo>(string.Format("FlowID={0} and UserID='{1}'", flowid, userid)) == null)
            //{
            //    return "无权查看";

            //}
            int    page        = Convert.ToInt32(context.Request["page"]);
            int    rows        = Convert.ToInt32(context.Request["rows"]);
            string searchtitle = context.Request["SearchTitle"];

            var searchCondition = string.Format("FlowID={0}", flowid);
            //if (!string.IsNullOrEmpty(searchtitle))
            //{
            //    searchCondition += "And FlowField like '%" + searchtitle + "%'";
            //}

            List <WXFlowDataInfo> list = bll.GetList <WXFlowDataInfo>(searchCondition);
            var    datatable           = bll.GetMemberFlowDataView(list);
            var    newdatatable        = GetPagedTable(datatable, page, rows);//分页
            int    totalCount          = datatable.Rows.Count;
            string jsonResult          = ZentCloud.Common.JSONHelper.DataTableToEasyUIJson(totalCount, newdatatable);

            return(jsonResult);
        }