Пример #1
0
        /// <summary>
        /// 根据条件获取数据
        /// </summary>
        private static string GetAllByAny(HttpContext context)
        {
            //if (!_isview)
            //{
            //    return null;
            //}

            int    pageIndex = Convert.ToInt32(context.Request["page"]);
            int    pageSize  = Convert.ToInt32(context.Request["rows"]);
            string keyWord   = context.Request["SearchTitle"];
            var    strWhere  = string.Format("UserID='{0}' And ReplyType='news' And RuleType=1", websiteOwner);

            if (!string.IsNullOrEmpty(keyWord))
            {
                strWhere += " And MsgKeyword like '%" + keyWord + "%'";
            }

            List <ZentCloud.BLLJIMP.Model.WeixinReplyRuleInfo> list = bll.GetLit <ZentCloud.BLLJIMP.Model.WeixinReplyRuleInfo>(pageSize, pageIndex, strWhere, "UID");

            int totalCount = bll.GetCount <ZentCloud.BLLJIMP.Model.WeixinReplyRuleInfo>(strWhere);

            return(Common.JSONHelper.ObjectToJson(
                       new
            {
                total = totalCount,
                rows = list
            }));
        }
Пример #2
0
        /// <summary>
        /// 根据条件获取数据
        /// </summary>
        private static string GetAllByAny(HttpContext context)
        {
            //if (!_isview)
            //{
            //    return null;
            //}
            var userid = Comm.DataLoadTool.GetCurrUserID();

            if (string.IsNullOrEmpty(userid))
            {
                return("请重新登录");
            }

            int    page            = Convert.ToInt32(context.Request["page"]);
            int    rows            = Convert.ToInt32(context.Request["rows"]);
            string searchtitle     = context.Request["SearchTitle"];
            var    searchCondition = string.Format("UserID='{0}'", userid);

            if (!string.IsNullOrEmpty(searchtitle))
            {
                searchCondition += "And FlowName like '%" + searchtitle + "%'";
            }

            List <WXFlowInfo> list = bll.GetLit <WXFlowInfo>(rows, page, searchCondition, "FlowID");

            int totalCount = bll.GetCount <WXFlowInfo>(searchCondition);

            string jsonResult = ZentCloud.Common.JSONHelper.ListToEasyUIJson(totalCount, list);

            return(jsonResult);
        }