Example #1
0
        /// <summary>
        /// 查询会员
        /// </summary>
        public string GetVipListData()
        {
            var form = Request("form").DeserializeJSONTo <VipQueryEntity>();

            var       vipBLL = new VipBLL(CurrentUserInfo);
            VipEntity vipList;
            string    content = string.Empty;

            int pageIndex = Utils.GetIntVal(FormatParamValue(Request("page")));

            VipSearchEntity queryEntity = new VipSearchEntity();

            queryEntity.VipInfo  = FormatParamValue(form.VipName);
            queryEntity.Phone    = FormatParamValue(form.Phone);
            queryEntity.Page     = pageIndex;
            queryEntity.PageSize = PageSize;

            vipList = vipBLL.SearchVipInfo(queryEntity);
            var dataTotalCount = vipList.ICount;

            var jsonData = new JsonData();

            jsonData.totalCount = dataTotalCount.ToString();
            jsonData.data       = vipList.vipInfoList;

            content = string.Format("{{\"totalCount\":{1},\"topics\":{0}}}",
                                    jsonData.data.ToJSON(),
                                    jsonData.totalCount);
            return(content);
        }
Example #2
0
        /// <summary>
        /// 查询
        /// </summary>
        public string GetVipListData()
        {
            var form = Request("form").DeserializeJSONTo <VipQueryEntity>();

            var       service = new VipBLL(CurrentUserInfo);
            VipEntity listObj = null;
            string    content = string.Empty;

            VipSearchEntity queryEntity = new VipSearchEntity();

            queryEntity.Page             = Utils.GetIntVal(Request("page"));
            queryEntity.PageSize         = PageSize;
            queryEntity.VipInfo          = FormatParamValue(form.VipInfo);
            queryEntity.Phone            = FormatParamValue(form.Phone);
            queryEntity.UnitId           = FormatParamValue(Request("UnitId"));
            queryEntity.MembershipShopId = FormatParamValue(Request("MembershipShopId"));

            queryEntity.VipSourceId = FormatParamValue(form.VipSourceId);
            if (form.VipSourceId == null)
            {
                queryEntity.VipSourceId = FormatParamValue(Request("VipSourceId"));
            }

            queryEntity.Status   = Utils.GetIntVal(FormatParamValue(form.Status));
            queryEntity.VipLevel = Utils.GetIntVal(FormatParamValue(form.VipLevel));
            queryEntity.RegistrationDateBegin  = FormatParamValue(form.RegistrationDateBegin);
            queryEntity.RegistrationDateEnd    = FormatParamValue(form.RegistrationDateEnd);
            queryEntity.RecentlySalesDateBegin = FormatParamValue(form.RecentlySalesDateBegin);
            queryEntity.RecentlySalesDateEnd   = FormatParamValue(form.RecentlySalesDateEnd);
            queryEntity.IntegrationBegin       = Utils.GetIntVal(FormatParamValue(form.IntegrationBegin));
            queryEntity.IntegrationEnd         = Utils.GetIntVal(FormatParamValue(form.IntegrationEnd));
            queryEntity.UserId     = CurrentUserInfo.CurrentUser.User_Id;
            queryEntity.CustomerId = CurrentUserInfo.CurrentUser.customer_id;

            //Jermyn20130801
            if (Request("tags") != "") // 标签及组合关系
            {
                queryEntity.Tags = FormatParamValue(Request("tags"));
            }

            listObj = service.SearchVipInfo(queryEntity);

            var jsonData = new JsonData();

            jsonData.totalCount = listObj.ICount.ToString();
            jsonData.data       = listObj.vipInfoList;

            content = string.Format("{{\"totalCount\":{1},\"topics\":{0}}}",
                                    jsonData.data.ToJSON(),
                                    jsonData.totalCount);
            return(content);
        }
Example #3
0
        private void SearchVipInfo()
        {
            VipSearchEntity vipSearchInfo = new VipSearchEntity();

            vipSearchInfo.Page     = 1;
            vipSearchInfo.PageSize = 15;
            LoggingSessionInfo loggingSessionInfo = new LoggingSessionInfo();

            loggingSessionInfo = new CLoggingSessionService().GetLoggingSessionInfo("29E11BDC6DAC439896958CC6866FF64E", "7d4cda48970b4ed0aa697d8c2c2e4af3");
            VipBLL    vipServer = new VipBLL(loggingSessionInfo);
            VipEntity vipInfo   = new VipEntity();

            vipInfo = vipServer.SearchVipInfo(vipSearchInfo);
            if (vipInfo != null)
            {
                this.lb1.Text = vipInfo.ICount.ToString();
                if (vipInfo.ICount > 0)
                {
                    this.GridView1.DataSource = vipInfo.vipInfoList;
                    this.GridView1.DataBind();
                }
            }
        }