Exemple #1
0
        /// <summary>
        /// 查询基地
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public string QueryBaseInfo(HttpContext context)
        {
            int    pageIndex = Convert.ToInt32(context.Request["page"]);
            int    pageSize  = Convert.ToInt32(context.Request["rows"]);
            string baseName  = context.Request["BaseName"];
            string area      = context.Request["Area"];

            StringBuilder sbWhere = new StringBuilder(string.Format("WebsiteOwner='{0}'", bll.WebsiteOwner));

            if (!string.IsNullOrEmpty(baseName))
            {
                sbWhere.AppendFormat(" And BaseName like '%{0}%'", baseName);
            }
            if (!string.IsNullOrEmpty(area))
            {
                sbWhere.AppendFormat(" And Area = '{0}'", area);
            }


            int totalCount             = bll.GetCount <WBBaseInfo>(sbWhere.ToString());
            List <WBBaseInfo> dataList = new List <WBBaseInfo>();

            dataList = bll.GetLit <WBBaseInfo>(pageSize, pageIndex, sbWhere.ToString(), "AutoID DESC");
            return(Common.JSONHelper.ObjectToJson(
                       new
            {
                total = totalCount,
                rows = dataList
            }));
        }
Exemple #2
0
        public void ProcessRequest(HttpContext context)
        {
            int    pageIndex = string.IsNullOrEmpty(context.Request["page"]) ? 1 : int.Parse(context.Request["page"]);
            int    pageSize  = string.IsNullOrEmpty(context.Request["rows"]) ? 1 : int.Parse(context.Request["rows"]);
            string keyWord   = context.Request["keyword"];

            System.Text.StringBuilder sbWhere = new System.Text.StringBuilder();

            sbWhere.AppendFormat(" WebsiteOwner='{0}'", bll.WebsiteOwner);

            if (!string.IsNullOrEmpty(keyWord))
            {
                sbWhere.AppendFormat(" And PageName like '%{0}%'", keyWord);
            }
            var totalCount = bll.GetCount <PcPage>(sbWhere.ToString());
            var sourceData = bll.GetLit <PcPage>(pageSize, pageIndex, sbWhere.ToString());
            var list       = from p in sourceData
                             select new {
                p.PageId,
                p.PageName
            };

            var data = new
            {
                total = totalCount,
                rows  = list
            };

            context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(data));
        }
Exemple #3
0
        public void ProcessRequest(HttpContext context)
        {
            int    pageIndex = !string.IsNullOrEmpty(context.Request["pageindex"]) ? int.Parse(context.Request["pageindex"]) : 1;
            int    pageSize  = !string.IsNullOrEmpty(context.Request["pagesize"]) ? int.Parse(context.Request["pagesize"]) : 10;
            string keyWord   = context.Request["keyword"];

            System.Text.StringBuilder sbWhere = new System.Text.StringBuilder(" 1=1");
            if (!string.IsNullOrEmpty(keyWord))
            {
                sbWhere.AppendFormat(" AND ExpressCompanyName like '%{0}%'", keyWord);
            }
            int totalCount  = bll.GetCount <ExpressInfo>(sbWhere.ToString());
            var expressData = bll.GetLit <ExpressInfo>(pageSize, pageIndex, sbWhere.ToString());
            var list        = from p in expressData
                              select new
            {
                express_company_name = p.ExpressCompanyName,
                express_company_code = p.ExpressCompanyCode
            };
            var data = new
            {
                totalcount = totalCount,
                list       = list//列表
            };

            context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(data));
            return;
        }
Exemple #4
0
        public void ProcessRequest(HttpContext context)
        {
            int    pageIndex = !string.IsNullOrEmpty(context.Request["pageindex"]) ? int.Parse(context.Request["pageindex"]) : 1;
            int    pageSize  = !string.IsNullOrEmpty(context.Request["pagesize"]) ? int.Parse(context.Request["pagesize"]) : 10;
            string keyWord   = context.Request["keyword"];

            System.Text.StringBuilder sbWhere = new System.Text.StringBuilder(string.Format(" WebSiteOwner='{0}' AND CategoryType='activity'", bll.WebsiteOwner));
            if (string.IsNullOrEmpty(keyWord))
            {
                sbWhere.AppendFormat(" AND CategoryName like '%{0}%' ", keyWord);
            }
            int totalCount       = bll.GetCount <ArticleCategory>(sbWhere.ToString());
            var mallCategoryData = bll.GetLit <ArticleCategory>(pageSize, pageIndex, sbWhere.ToString());
            var list             = from p in mallCategoryData
                                   select new
            {
                category_id        = p.AutoID,
                category_name      = p.CategoryName,
                category_summary   = p.Summary,
                category_img_url   = p.ImgSrc,
                category_sort      = p.Sort,
                category_systype   = p.SysType,
                category_parent_id = p.PreID
            };
            var data = new
            {
                totalcount = totalCount,
                list       = list//列表
            };

            context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(data));
        }
Exemple #5
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}'", websiteOwner);

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

            List <ZentCloud.BLLJIMP.Model.WeixinMsgSourceInfo> list = bll.GetLit <ZentCloud.BLLJIMP.Model.WeixinMsgSourceInfo>(pageSize, pageIndex, strWhere, "SourceID DESC");

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

            return(Common.JSONHelper.ObjectToJson(
                       new
            {
                total = totalCount,
                rows = list
            }));
        }
Exemple #6
0
        /// <summary>
        /// 获取公司列表
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string List(HttpContext context)
        {
            int    pageIndex = !string.IsNullOrEmpty(context.Request["pageindex"]) ? int.Parse(context.Request["pageindex"]) : 1;
            int    pageSize  = !string.IsNullOrEmpty(context.Request["pagesize"]) ? int.Parse(context.Request["pagesize"]) : 10;
            string keyWord   = context.Request["keyword"];

            System.Text.StringBuilder sbWhere = new System.Text.StringBuilder(string.Format(" WebSiteOwner='{0}'", bll.WebsiteOwner));
            if (!string.IsNullOrEmpty(keyWord))
            {
                sbWhere.AppendFormat(" And ComPanyName like '%{0}%'", keyWord);
            }
            int totalCount = bll.GetCount <CompanyInfo>(sbWhere.ToString());
            var sourceData = bll.GetLit <CompanyInfo>(pageSize, pageIndex, sbWhere.ToString());
            var list       = from p in sourceData
                             select new
            {
                company_id         = p.CompanyId,
                company_logo       = bll.GetImgUrl(p.CompanyLogo),
                company_name       = p.ComPanyName,
                company_tel        = p.LinkTel,
                company_natrue     = p.Nature,
                company_director   = p.Director,
                company_websiteurl = p.WebsiteUrl
            };

            var data = new
            {
                totalcount = totalCount,
                list       = list,//列表
            };

            return(ZentCloud.Common.JSONHelper.ObjectToJson(data));
        }
        /// <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}'", DataLoadTool.GetCurrUserID());

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

            List <ZentCloud.BLLJIMP.Model.WeixinMemberInfo> dataList = bll.GetLit <ZentCloud.BLLJIMP.Model.WeixinMemberInfo>(pageSize, pageIndex, strWhere, "RegDate ASC");

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

            return(Common.JSONHelper.ObjectToJson(
                       new
            {
                total = totalCount,
                rows = dataList
            }));
        }
Exemple #8
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            int    pageIndex = !string.IsNullOrEmpty(context.Request["pageindex"]) ? int.Parse(context.Request["pageindex"]) : 1;
            int    pageSize  = !string.IsNullOrEmpty(context.Request["pagesize"]) ? int.Parse(context.Request["pagesize"]) : 10;
            string keyWord   = context.Request["keyword"];

            System.Text.StringBuilder sbWhere = new System.Text.StringBuilder(string.Format(" WebSiteOwner='{0}'", bll.WebsiteOwner));
            if (!string.IsNullOrEmpty(keyWord))
            {
                sbWhere.AppendFormat(" AND LinkText like '%{0}%'", keyWord);
            }
            int totalCount = bll.GetCount <ZentCloud.BLLJIMP.Model.Slide>(sbWhere.ToString());
            var slideData  = bll.GetLit <ZentCloud.BLLJIMP.Model.Slide>(pageSize, pageIndex, sbWhere.ToString());
            var list       = from p in slideData
                             select new
            {
                slide_id   = p.AutoID,
                img_url    = p.ImageUrl,
                link       = p.Link,
                link_text  = p.LinkText,
                slide_type = p.Type,
                slide_sort = p.Sort
            };
            var data = new
            {
                totalcount = totalCount,
                list       = list//列表
            };

            context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(data));
        }
Exemple #9
0
        private static string GetAllByAny(HttpContext context)
        {
            int    pageIndex   = Convert.ToInt32(context.Request["page"]);
            int    pageSize    = Convert.ToInt32(context.Request["rows"]);
            string searchtitle = context.Request["SearchTitle"];
            string filterType  = context.Request["FilterType"];



            var sbWhere = new System.Text.StringBuilder(" 1=1");

            if (!string.IsNullOrEmpty(searchtitle))
            {
                sbWhere.AppendFormat(" And PagePath like '%{0}%'", searchtitle);
            }
            if (!string.IsNullOrEmpty(filterType))
            {
                sbWhere.AppendFormat(" And FilterType ='{0}'", filterType);
            }
            else
            {
                sbWhere.AppendFormat(" And FilterType !='WXOAuth'");
            }

            List <ModuleFilterInfo> list = bll.GetLit <ModuleFilterInfo>(pageSize, pageIndex, sbWhere.ToString(), "PagePath ASC");

            int totalCount = bll.GetCount <ZentCloud.BLLJIMP.Model.ModuleFilterInfo>(sbWhere.ToString());

            return(Common.JSONHelper.ObjectToJson(
                       new
            {
                total = totalCount,
                rows = list
            }));
        }
Exemple #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            WebsiteOwner = Comm.DataLoadTool.GetWebsiteInfoModel().WebsiteOwner;
            var CategoryList = bll.GetLit <WXMallCategory>(3, 1, string.Format("WebsiteOwner='{0}'", WebsiteOwner));

            if (CategoryList.Count.Equals(0))
            {
                sbCategory.AppendFormat("<div style=\"width:100%;float:left;\" >全部</div>");
            }
            if (CategoryList.Count.Equals(1))
            {
                Width = "100%";
            }
            if (CategoryList.Count.Equals(2))
            {
                Width = "50%";
            }
            if (CategoryList.Count.Equals(3))
            {
                Width = "33.33%";
            }


            foreach (var item in CategoryList)
            {
                sbCategory.AppendFormat("<div style=\"width:{0};float:left;\" data-categoryid=\"{1}\">{2}</div>", Width, item.AutoID, item.CategoryName);
            }
        }
Exemple #11
0
        /// <summary>
        /// 根据条件获取数据
        /// </summary>
        private string GetAllByAny(HttpContext context)
        {
            int page                            = Convert.ToInt32(context.Request["page"]);
            int rows                            = Convert.ToInt32(context.Request["rows"]);
            var searchCondition                 = string.Format("UserID='{0}' And GroupType=1", Comm.DataLoadTool.GetCurrUserID());
            List <MemberGroupInfo> list         = bll.GetLit <MemberGroupInfo>(rows, page, searchCondition, "GroupName DESC");
            MemberGroupInfo        DefaultGroup = new MemberGroupInfo();

            DefaultGroup.GroupID   = "0";
            DefaultGroup.GroupName = "无分组";
            list.Add(DefaultGroup);

            int    totalCount = bll.GetCount <MemberGroupInfo>(searchCondition);
            string jsonResult = ZentCloud.Common.JSONHelper.ObjectToJson(totalCount, list);

            return(jsonResult);

            //var searchCondition = string.Format("UserID='{0}' And GroupType=1", Comm.DataLoadTool.GetCurrUserID());
            //List<MemberGroupInfo> list = bll.GetList<MemberGroupInfo>(searchCondition);
            //MemberGroupInfo DefaultGroup = new MemberGroupInfo();
            //DefaultGroup.GroupID = "-2";
            //DefaultGroup.GroupName="无分组";
            //list.Add(DefaultGroup);
            //int totalCount = bll.GetCount<MemberGroupInfo>(searchCondition);
            //string jsonResult = ZentCloud.Common.JSONHelper.ObjectToJson(totalCount, list);
            //return jsonResult;
        }
Exemple #12
0
        public void ProcessRequest(HttpContext context)
        {
            int    pageIndex = !string.IsNullOrEmpty(context.Request["pageindex"]) ? int.Parse(context.Request["pageindex"]) : 1;
            int    pageSize  = !string.IsNullOrEmpty(context.Request["pagesize"]) ? int.Parse(context.Request["pagesize"]) : 10;
            string keyWord   = context.Request["keyword"];

            System.Text.StringBuilder sbWhere = new System.Text.StringBuilder(string.Format(" WebsiteOwner='{0}'", bll.WebsiteOwner));
            if (!string.IsNullOrEmpty(keyWord))
            {
                sbWhere.AppendFormat(" AND TypeName like '%{0}%'", keyWord);
            }
            int totalCount  = bll.GetCount <ZentCloud.BLLJIMP.Model.TypeInfo>(sbWhere.ToString());
            var expressData = bll.GetLit <ZentCloud.BLLJIMP.Model.TypeInfo>(pageSize, pageIndex, sbWhere.ToString());
            var list        = from p in expressData
                              select new
            {
                type_id   = p.TypeId,
                type_name = p.TypeName
            };

            apiResp.status = true;
            apiResp.msg    = "ok";
            apiResp.result = new
            {
                totalcount = totalCount,
                list       = list//列表
            };
            context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(apiResp));
        }
Exemple #13
0
        /// <summary>
        /// 查询付款人员信息
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string QueryPayPersion(HttpContext context)
        {
            int pageIndex   = int.Parse(context.Request["PageIndex"]);
            int pageSize    = int.Parse(context.Request["PageSize"]);
            int crowdFundId = int.Parse(context.Request["CrowdFundID"]);
            List <PayPersionModel> result = new List <PayPersionModel>();

            System.Text.StringBuilder sbWhere = new System.Text.StringBuilder();
            sbWhere.AppendFormat(" CrowdFundID={0} And Status=1", crowdFundId);
            List <CrowdFundRecord> sourceList = bllBase.GetLit <CrowdFundRecord>(pageSize, pageIndex, sbWhere.ToString(), " RecordID DESC");

            foreach (var item in sourceList)
            {
                UserInfo        userInfo = bllUser.GetUserInfo(item.UserID);
                PayPersionModel model    = new PayPersionModel();
                model.HeadIimg = userInfo.WXHeadimgurlLocal;
                if (string.IsNullOrEmpty(model.HeadIimg))
                {
                    model.HeadIimg = "/img/persion.png";
                }
                model.ShowName   = item.Name;
                model.Amount     = item.Amount;
                model.InsertDate = item.InsertDate.ToString("MM-dd");
                model.Review     = item.Review;
                result.Add(model);
            }
            return(Common.JSONHelper.ObjectToJson(result));
        }
        /// <summary>
        /// 根据条件获取数据
        /// </summary>
        private static string GetAllByAny(HttpContext context)
        {
            //if (!_isview)
            //{
            //    return null;
            //}

            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}'", Comm.DataLoadTool.GetCurrUserID());

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

            List <WeiboUserCollect> list = bll.GetLit <WeiboUserCollect>(rows, page, searchCondition, "AddDate DESC");

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

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

            return(jsonResult);
        }
Exemple #15
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  = "";
            var    userinfo  = DataLoadTool.GetCurrUserModel();

            if (userinfo.UserType != 1)
            {
                strWhere = string.Format("UserID='{0}'", userinfo.UserID);
            }
            if (!string.IsNullOrEmpty(keyWord))
            {
                strWhere += " UserID like '%" + keyWord + "%'";
            }

            List <ZentCloud.BLLJIMP.Model.WeixinMsgDetails> list = bll.GetLit <ZentCloud.BLLJIMP.Model.WeixinMsgDetails>(pageSize, pageIndex, strWhere, "ReplyDate DESC");

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

            return(Common.JSONHelper.ObjectToJson(
                       new
            {
                total = totalCount,
                rows = list
            }));
        }
Exemple #16
0
        /// <summary>
        /// 获取答题人信息
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string GetAnswerUserInfo(HttpContext context)
        {
            int           pageIndex    = !string.IsNullOrEmpty(context.Request["page"])?int.Parse(context.Request["page"]):1;
            int           pageSize     = !string.IsNullOrEmpty(context.Request["rows"])?int.Parse(context.Request["rows"]):50;
            string        activityId   = context.Request["aid"];
            string        spreadUserId = context.Request["spread_userid"];
            StringBuilder sbWhere      = new StringBuilder();

            sbWhere.AppendFormat(" QuestionnaireID={0} ", int.Parse(activityId));
            if (!string.IsNullOrEmpty(spreadUserId))
            {
                sbWhere.AppendFormat(" AND PreUserId='{0}' ", spreadUserId);
            }

            int count = bllActivity.GetCount <QuestionnaireRecord>(sbWhere.ToString());

            List <QuestionnaireRecord> list = bll.GetLit <QuestionnaireRecord>(pageSize, pageIndex, sbWhere.ToString(), " InsertDate DESC ");

            List <UserModel> returnList = new List <UserModel>();

            foreach (var item in list)
            {
                UserInfo  user  = bllUser.GetUserInfo(item.UserId);
                UserModel model = new UserModel();
                model.head_img_url = user.WXHeadimgurl;
                model.name         = user.TrueName;
                model.wx_nick_name = user.WXNickname;
                model.phone        = user.Phone;
                model.email        = user.Email;
                model.company      = user.Company;
                model.postion      = user.Postion;
                returnList.Add(model);
            }
            return(Common.JSONHelper.ObjectToJson(new
            {
                total = count,
                rows = returnList
            }));
        }
Exemple #17
0
        /// <summary>
        /// 获取文章评论信息
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string GetArticleReviewlist(HttpContext context)
        {
            string           id        = context.Request["articleid"];
            int              pageIndex = int.Parse(context.Request["pageindex"]);
            int              pageSize  = int.Parse(context.Request["pagesize"]);
            ArticleReviewApi apiResult = new ArticleReviewApi();
            StringBuilder    sbWhere   = new StringBuilder();

            sbWhere.AppendFormat(" ReviewID={0}", id);
            apiResult.totalcount = bll.GetCount <ReplyReviewInfo>(sbWhere.ToString());
            List <ReplyReviewInfo> data       = bll.GetLit <BLLJIMP.Model.ReplyReviewInfo>(pageSize, pageIndex, sbWhere.ToString(), " AutoId desc");
            List <ArticleReview>   jsonResult = new List <ArticleReview>();

            foreach (var item in data)
            {
                ArticleReview review = new ArticleReview();
                //目标评论内容
                if (item.PraentId > 0)
                {
                    var targetReply = bll.Get <ReplyReviewInfo>(string.Format("AutoId={0}", item.PraentId)); if (targetReply != null)
                    {
                        review.reply = new ArticleReplyReview();
                        review.reply.reviewcontent = targetReply.ReplyContent;
                        review.reply.nickname      = targetReply.UserName;
                    }
                }

                //目标评论内容
                var userInfo = bllUser.GetUserInfo(item.UserId);
                if (userInfo != null)
                {
                    review.headimg = userInfo.WXHeadimgurlLocal;
                }
                review.id            = item.AutoId;
                review.nickname      = item.UserName;
                review.time          = bll.GetTimeStamp(item.InsertDate);
                review.reviewcontent = item.ReplyContent;
                if ((bll.IsLogin) && (item.UserId.Equals(currentUserInfo.UserID)))
                {
                    review.deleteflag = true;
                }


                jsonResult.Add(review);
            }
            apiResult.list = jsonResult;
            return(Common.JSONHelper.ObjectToJson(apiResult));
        }
Exemple #18
0
        private static string GetAllByAny(HttpContext context)
        {
            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}'", Comm.DataLoadTool.GetCurrUserID());

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

            List <UserSignHistory> list = bll.GetLit <UserSignHistory>(rows, page, searchCondition, "AddDate DESC");

            int totalCount = bll.GetCount <ZentCloud.BLLJIMP.Model.UserSignHistory>(searchCondition);

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

            return(jsonResult);
        }
Exemple #19
0
        /// <summary>
        /// 列表
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string List(HttpContext context)
        {
            System.Text.StringBuilder sbWhere = new System.Text.StringBuilder(string.Format(" WebsiteOwner='{0}'", bll.WebsiteOwner));
            string keyWord = context.Request["keyword"];

            if (!string.IsNullOrEmpty(keyWord))
            {
                sbWhere.AppendFormat(" And (BarCode='{0}' Or CodeName='{0}' Or ModelCode='{0}')", keyWord);
            }
            var totalCount = bll.GetCount <BarCodeInfo>(sbWhere.ToString());
            var sourceData = bll.GetLit <BarCodeInfo>(rows, page, sbWhere.ToString(), "AutoId DESC");

            var data = new
            {
                total = totalCount,
                rows  = sourceData//列表
            };

            return(ZentCloud.Common.JSONHelper.ObjectToJson(data));
        }
Exemple #20
0
        /// <summary>
        /// 获取中奖记录
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string getdonationrecord(HttpContext context)
        {
            DonationsModel result      = new DonationsModel();
            List <Person>  list        = new List <Person>();
            int            PeopleCount = 0;
            decimal        TotalAmount = 0;

            if (string.IsNullOrEmpty(context.Request["pageindex"]))
            {
                //resp.Msg = "pageindex不能为空";
                goto outoff;
            }
            if (string.IsNullOrEmpty(context.Request["pagesize"]))
            {
                //resp.Msg = "pagesize不能为空";
                goto outoff;
            }
            int pageIndex = int.Parse(context.Request["pageindex"]);
            int pageSize  = int.Parse(context.Request["pagesize"]);
            var source    = bll.GetLit <WXMallOrderInfo>(pageSize, pageIndex, string.Format("WebsiteOwner='qianwei' And OrderUserID='system' And PaymentStatus=1"), " InsertDate DESC");

            PeopleCount = bll.GetCount <WXMallOrderInfo>(string.Format("WebsiteOwner='qianwei' And OrderUserID='system' And PaymentStatus=1"));
            TotalAmount = bll.GetList <WXMallOrderInfo>(string.Format("WebsiteOwner='qianwei' And OrderUserID='system' And PaymentStatus=1")).Sum(p => p.TotalAmount);


            foreach (var item in source)
            {
                Person model = new Person();
                model.showname = item.Consignee;
                model.money    = item.TotalAmount;
                list.Add(model);
            }
outoff:
            result.list       = list;
            result.totalcount = PeopleCount;
            result.totalmoney = TotalAmount;
            return(Common.JSONHelper.ObjectToJson(result));
        }
Exemple #21
0
        /// <summary>
        /// 获取众筹活动列表
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string List(HttpContext context)
        {
            int    pageIndex = !string.IsNullOrEmpty(context.Request["pageindex"]) ? int.Parse(context.Request["pageindex"]) : 1;
            int    pageSize  = !string.IsNullOrEmpty(context.Request["pagesize"]) ? int.Parse(context.Request["pagesize"]) : 10;
            string keyWord   = context.Request["keyword"];
            string type      = context.Request["crowdfund_type"];

            System.Text.StringBuilder sbWhere = new System.Text.StringBuilder(string.Format(" WebSiteOwner='{0}'", bll.WebsiteOwner));
            if (!string.IsNullOrEmpty(keyWord))
            {
                sbWhere.AppendFormat(" And Title like '%{0}%'", keyWord);
            }
            if (!string.IsNullOrEmpty(type))
            {
                sbWhere.AppendFormat(" And Type ={0}", type);
            }
            int totalCount = bll.GetCount <CrowdFundInfo>(sbWhere.ToString());
            var sourceData = bll.GetLit <CrowdFundInfo>(pageSize, pageIndex, sbWhere.ToString(), " AutoID DESC ");
            var list       = from p in sourceData
                             select new
            {
                crowdfund_id         = p.CrowdFundID,
                crowdfund_type       = p.Type,
                crowdfund_title      = p.Title,
                crowdfund_img_url    = p.CoverImage,
                crowdfund_pay_amount = p.TotalPayAmount,
                crowdfund_pay_count  = p.PayPersionCount,
                crowdfund_percent    = p.PayPercent
            };

            var data = new
            {
                totalcount = totalCount,
                list       = list,//列表
            };

            return(ZentCloud.Common.JSONHelper.ObjectToJson(data));
        }
Exemple #22
0
        public void ProcessRequest(HttpContext context)
        {
            int    pageIndex      = !string.IsNullOrEmpty(context.Request["pageindex"]) ? int.Parse(context.Request["pageindex"]) : 1;
            int    pageSize       = !string.IsNullOrEmpty(context.Request["pagesize"]) ? int.Parse(context.Request["pagesize"]) : 10;
            string keyWord        = context.Request["keyword"];
            string navigationType = context.Request["navigation_link_type"];

            System.Text.StringBuilder sbWhere = new System.Text.StringBuilder(string.Format(" WebSiteOwner='{0}'", bll.WebsiteOwner));
            if (!string.IsNullOrEmpty(keyWord))
            {
                sbWhere.AppendFormat(" AND NavigationName like '%{0}%'", keyWord);
            }
            if (!string.IsNullOrEmpty(navigationType))
            {
                sbWhere.AppendFormat(" AND NavigationLinkType ='{0}'", navigationType);
            }
            int totalCount     = bll.GetCount <ZentCloud.BLLJIMP.Model.Navigation>(sbWhere.ToString());
            var navigationData = bll.GetLit <ZentCloud.BLLJIMP.Model.Navigation>(pageSize, pageIndex, sbWhere.ToString());
            var list           = from p in navigationData
                                 select new
            {
                navigation_id        = p.AutoID,
                pre_id               = p.ParentId,
                navigation_img       = p.NavigationImage,
                navigation_name      = p.NavigationName,
                navigation_link      = p.NavigationLink,
                navigation_link_type = p.NavigationLinkType,
                navigation_sort      = p.Sort
            };
            var data = new
            {
                totalcount = totalCount,
                list       = list//列表
            };

            context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(data));
        }
        /// <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 <WXFlowStepInfo> list = bll.GetLit <WXFlowStepInfo>(rows, page, searchCondition, "StepID ASC");

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

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

            return(jsonResult);
        }