Exemplo n.º 1
0
        /// <summary>
        /// 获取活动 所有报名人信息
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string GetSignUpActivityInfo(HttpContext context)
        {
            int    pageIndex          = Convert.ToInt32(context.Request["PageIndex"]);
            int    pageSize           = Convert.ToInt32(context.Request["PageSize"]);
            string activityId         = context.Request["ActivityID"];
            string spreadUserId       = currentUserInfo.UserID;
            string monitorPlanId      = context.Request["MonitorPlanID"];
            SignUpActivityPInfo model = new SignUpActivityPInfo();

            if (string.IsNullOrEmpty(activityId) && string.IsNullOrEmpty(spreadUserId) && string.IsNullOrEmpty(monitorPlanId))
            {
                resp.Status = -1;
                resp.Msg    = "信息不完整";
                goto OutF;
            }

            List <BLLJIMP.Model.ActivityFieldMappingInfo> mapList = bllJuactivity.GetList <BLLJIMP.Model.ActivityFieldMappingInfo>(string.Format(" ActivityId='{0}'", activityId));

            model.MappingNum = mapList.Count;
            model.mppInfo    = mapList;

            StringBuilder sbWhere = new StringBuilder(" SpreadUserID='" + currentUserInfo.UserID + "' AND  ActivityID= '" + activityId + "'");

            sbWhere.AppendFormat(" AND MonitorPlanID='{0}' AND WebsiteOwner='{1}' And IsDelete=0 ", monitorPlanId, bll.WebsiteOwner);

            int totalCount = this.bllJuactivity.GetCount <BLLJIMP.Model.ActivityDataInfo>(sbWhere.ToString());
            List <BLLJIMP.Model.ActivityDataInfo> activityDataInfo = this.bllJuactivity.GetLit <BLLJIMP.Model.ActivityDataInfo>(pageSize, pageIndex, sbWhere.ToString(), " InsertDate DESC ");

            if (activityDataInfo != null)
            {
                model.AdInfo     = activityDataInfo;
                model.totalCount = totalCount;
            }
            if (model != null)
            {
                resp.Status = 1;
                resp.ExObj  = model;
            }
            else
            {
                resp.Status = -1;
                resp.Msg    = "没有数据!!!";
            }


            int totalPage = bll.GetTotalPage(totalCount, pageSize);

            if ((totalPage > pageIndex) && (pageIndex.Equals(1)))
            {
                resp.ExStr = "1";//是否增加下一页按钮
            }

OutF:
            return(Common.JSONHelper.ObjectToJson(resp));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取选手列表 分页 搜索
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string GetVoteObjectVoteList(HttpContext context)
        {
            int    voteId           = int.Parse(context.Request["voteid"]);
            int    pageIndex        = int.Parse(context.Request["pageindex"]);
            int    pageSize         = int.Parse(context.Request["pagesize"]);
            string voteObjectName   = context.Request["name"];
            string voteObjectNumber = context.Request["number"];
            string sort             = context.Request["Sort"];
            int    totalcount       = 0;//总数量

            resp.ExObj = bllVote.GetVoteObjectInfoList(voteId, pageIndex, pageSize, out totalcount, voteObjectName, voteObjectNumber, "", sort);
            int totalpage = bll.GetTotalPage(totalcount, pageSize);

            if ((totalpage > pageIndex) && (pageIndex.Equals(1)))
            {
                resp.ExInt = 1;//是否增加下一页按钮
            }
            return(Common.JSONHelper.ObjectToJson(resp));
        }