コード例 #1
0
        protected override void AttachChildControls()
        {
            this.rptProducts = (VshopTemplatedRepeater)this.FindControl("rptProducts");
            this.txtTotal    = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            int pageIndex;

            if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex))
            {
                pageIndex = 1;
            }
            int pageSize;

            if (!int.TryParse(this.Page.Request.QueryString["size"], out pageSize))
            {
                pageSize = 20;
            }
            DbQueryResult productConsultations = ProductBrowser.GetProductConsultations(new ProductConsultationAndReplyQuery
            {
                UserId    = HiContext.Current.User.UserId,
                IsCount   = true,
                PageIndex = pageIndex,
                PageSize  = pageSize,
                SortBy    = "ConsultationId",
                SortOrder = SortAction.Desc
            });

            this.rptProducts.DataSource = productConsultations.Data;
            this.rptProducts.DataBind();
            this.txtTotal.SetWhenIsNotNull(productConsultations.TotalRecords.ToString());
            PageTitle.AddSiteNameTitle("商品咨询");
        }
コード例 #2
0
        protected override void AttachChildControls()
        {
            int num;
            int num2;

            PageTitle.AddSiteNameTitle("砍价活动");
            this.rpMyMemberList = (VshopTemplatedRepeater)this.FindControl("rpBargainList");
            this.hiddTotal      = (HtmlInputHidden)this.FindControl("hiddTotal");
            this.hiddPageIndex  = (HtmlInputHidden)this.FindControl("hiddPageIndex");
            if (!int.TryParse(this.Page.Request.QueryString["page"], out num))
            {
                num = 1;
            }
            if (!int.TryParse(this.Page.Request.QueryString["size"], out num2))
            {
                num2 = 10;
            }
            int          num3  = Globals.RequestQueryNum("status");
            BargainQuery query = new BargainQuery {
                Type      = num3.ToString(),
                PageSize  = num2,
                PageIndex = num
            };
            int           total       = BargainHelper.GetTotal(query);
            DbQueryResult bargainList = BargainHelper.GetBargainList(query);

            this.hiddTotal.Value           = ((DataTable)bargainList.Data).Rows.Count.ToString();
            this.hiddPageIndex.Value       = num.ToString();
            this.rpMyMemberList.DataSource = bargainList.Data;
            this.rpMyMemberList.DataBind();
        }
コード例 #3
0
ファイル: VMemberComment.cs プロジェクト: 123456-cq/xkq34_src
        protected override void AttachChildControls()
        {
            int num;
            int num2;

            this.txtTotal      = (HtmlInputHidden)this.FindControl("txtTotal");
            this.txtShowTabNum = (HtmlInputHidden)this.FindControl("txtShowTabNum");
            PageTitle.AddSiteNameTitle("评价列表");
            if (!int.TryParse(this.Page.Request.QueryString["page"], out num))
            {
                num = 1;
            }
            if (!int.TryParse(this.Page.Request.QueryString["size"], out num2))
            {
                num2 = 10;
            }
            OrderQuery query = new OrderQuery {
                PageIndex = num,
                PageSize  = num2,
                SortBy    = "Id",
                SortOrder = SortAction.Desc
            };
            int currentMemberUserId = Globals.GetCurrentMemberUserId();
            int orderItemsStatus    = 5;

            this.rptOrderItemList = (VshopTemplatedRepeater)this.FindControl("rptOrderItemList");
            DbQueryResult result = ProductBrowser.GetOrderMemberComment(query, currentMemberUserId, orderItemsStatus);

            this.rptOrderItemList.DataSource = result.Data;
            this.rptOrderItemList.DataBind();
            this.txtTotal.SetWhenIsNotNull(result.TotalRecords.ToString());
        }
コード例 #4
0
        protected override void AttachChildControls()
        {
            int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId);
            this.keyWord       = this.Page.Request.QueryString["keyWord"];
            this.imgUrl        = (HiImage)this.FindControl("imgUrl");
            this.litContent    = (System.Web.UI.WebControls.Literal) this.FindControl("litContent");
            this.rptProducts   = (VshopTemplatedRepeater)this.FindControl("rptCountDownProducts");
            this.txtTotal      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            this.rptCategories = (VshopTemplatedRepeater)this.FindControl("rptCategories");
            if (this.rptCategories != null)
            {
                System.Collections.Generic.IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 1000);
                this.rptCategories.DataSource = maxSubCategories;
                this.rptCategories.DataBind();
            }
            int page;

            if (!int.TryParse(this.Page.Request.QueryString["page"], out page))
            {
                page = 1;
            }
            int size;

            if (!int.TryParse(this.Page.Request.QueryString["size"], out size))
            {
                size = 10;
            }
            int       num;
            DataTable countDownProductList = ProductBrowser.GetCountDownProductList(new int?(this.categoryId), this.keyWord, page, size, out num, true);

            this.rptProducts.DataSource = countDownProductList;
            this.rptProducts.DataBind();
            this.txtTotal.SetWhenIsNotNull(num.ToString());
            PageTitle.AddSiteNameTitle("限时抢购");
        }
コード例 #5
0
 protected override void AttachChildControls()
 {
     if (DistributorsBrower.GetUserIdDistributors(Globals.GetCurrentMemberUserId()).ReferralStatus != 0)
     {
         HttpContext.Current.Response.Redirect("MemberCenter.aspx");
     }
     else
     {
         this.vshoporders  = (VshopTemplatedRepeater)this.FindControl("vshoporders");
         this.litfinishnum = (Literal)this.FindControl("litfinishnum");
         this.litallnum    = (Literal)this.FindControl("litallnum");
         PageTitle.AddSiteNameTitle("店铺订单");
         int result = 0;
         int.TryParse(HttpContext.Current.Request.QueryString.Get("status"), out result);
         OrderQuery query = new OrderQuery {
             UserId = new int?(Globals.GetCurrentMemberUserId())
         };
         if (result != 5)
         {
             query.Status           = OrderStatus.Finished;
             this.litfinishnum.Text = DistributorsBrower.GetDistributorOrderCount(query).ToString();
             query.Status           = OrderStatus.All;
             this.litallnum.Text    = DistributorsBrower.GetDistributorOrderCount(query).ToString();
         }
         else
         {
             this.litallnum.Text    = DistributorsBrower.GetDistributorOrderCount(query).ToString();
             query.Status           = OrderStatus.Finished;
             this.litfinishnum.Text = DistributorsBrower.GetDistributorOrderCount(query).ToString();
         }
         this.vshoporders.ItemDataBound += new RepeaterItemEventHandler(this.vshoporders_ItemDataBound);
         this.vshoporders.DataSource     = DistributorsBrower.GetDistributorOrder(query);
         this.vshoporders.DataBind();
     }
 }
コード例 #6
0
ファイル: VMemberComment.cs プロジェクト: llenroc/kangaroo
        protected override void AttachChildControls()
        {
            this.txtTotal      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            this.txtShowTabNum = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtShowTabNum");
            PageTitle.AddSiteNameTitle("评价列表");
            int pageIndex;

            if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex))
            {
                pageIndex = 1;
            }
            int pageSize;

            if (!int.TryParse(this.Page.Request.QueryString["size"], out pageSize))
            {
                pageSize = 10;
            }
            OrderQuery orderQuery = new OrderQuery();

            orderQuery.PageIndex = pageIndex;
            orderQuery.PageSize  = pageSize;
            orderQuery.SortBy    = "Id";
            orderQuery.SortOrder = SortAction.Desc;
            int currentMemberUserId = Globals.GetCurrentMemberUserId(false);
            int orderItemsStatus    = 5;

            this.rptOrderItemList = (VshopTemplatedRepeater)this.FindControl("rptOrderItemList");
            DbQueryResult orderMemberComment = ProductBrowser.GetOrderMemberComment(orderQuery, currentMemberUserId, orderItemsStatus);

            this.rptOrderItemList.DataSource = orderMemberComment.Data;
            this.rptOrderItemList.DataBind();
            this.txtTotal.SetWhenIsNotNull(orderMemberComment.TotalRecords.ToString());
        }
コード例 #7
0
ファイル: VNineImages.cs プロジェクト: 123456-cq/xkq34_src
 protected override void AttachChildControls()
 {
     this.refriendscircle = (VshopTemplatedRepeater)this.FindControl("refriendscircle");
     this.pager           = (Pager)this.FindControl("pager");
     PageTitle.AddSiteNameTitle("九图一文素材");
     this.BindData();
 }
コード例 #8
0
ファイル: VGroupBuyList.cs プロジェクト: wuchao288/wexin
        protected override void AttachChildControls()
        {
            int num;
            int num2;
            int num3;

            int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId);
            this.keyWord       = this.Page.Request.QueryString["keyWord"];
            this.imgUrl        = (HiImage)this.FindControl("imgUrl");
            this.litContent    = (Literal)this.FindControl("litContent");
            this.rptProducts   = (VshopTemplatedRepeater)this.FindControl("rptGroupBuyProducts");
            this.txtTotal      = (HtmlInputHidden)this.FindControl("txtTotal");
            this.rptCategories = (VshopTemplatedRepeater)this.FindControl("rptCategories");
            if (this.rptCategories != null)
            {
                IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 0x3e8);
                this.rptCategories.DataSource = maxSubCategories;
                this.rptCategories.DataBind();
            }
            if (!int.TryParse(this.Page.Request.QueryString["page"], out num))
            {
                num = 1;
            }
            if (!int.TryParse(this.Page.Request.QueryString["size"], out num2))
            {
                num2 = 10;
            }
            this.rptProducts.DataSource = GroupBuyBrowser.GetGroupBuyProducts(new int?(this.categoryId), this.keyWord, num, num2, out num3, true);
            this.rptProducts.DataBind();
            this.txtTotal.SetWhenIsNotNull(num3.ToString());
            PageTitle.AddSiteNameTitle("团购搜索页");
        }
コード例 #9
0
        protected override void AttachChildControls()
        {
            int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId);
            this.keyWord = this.Page.Request.QueryString["keyWord"];
            //this.rptProducts = (VshopTemplatedRepeater)this.FindControl("rptProducts");
            this.rptCategories = (VshopTemplatedRepeater)this.FindControl("rptCategories");
            this.litCategoryId = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("litCategoryId");
            this.litCategoryId.SetWhenIsNotNull(this.categoryId.ToString());


            MemberInfo currentMember = MemberProcessor.GetCurrentMember();

            if (currentMember == null)
            {
                this.Page.Response.Redirect("UserLogin.aspx");
            }
            HttpCookie cookie         = HttpContext.Current.Request.Cookies["Vshop-ReferralId"];
            int        ReferralUserId = 0;

            if ((cookie != null) && !string.IsNullOrEmpty(cookie.Value))
            {
                ReferralUserId = Convert.ToInt32(cookie.Value);
            }

            Hidistro.Core.HiCache.Remove("DataCache-CategoriesRange");//清除分类缓存
            //获取手机端所有商品的分类
            DataTable dt = CategoryBrowser.GetCategoriesByRange(2);

            this.rptCategories.DataSource = dt;
            this.rptCategories.DataBind();
        }
コード例 #10
0
ファイル: VBargainList.cs プロジェクト: llenroc/kangaroo
        protected override void AttachChildControls()
        {
            PageTitle.AddSiteNameTitle("砍价活动");
            this.rpMyMemberList = (VshopTemplatedRepeater)this.FindControl("rpBargainList");
            this.hiddTotal      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("hiddTotal");
            this.hiddPageIndex  = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("hiddPageIndex");
            int pageIndex;

            if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex))
            {
                pageIndex = 1;
            }
            int pageSize;

            if (!int.TryParse(this.Page.Request.QueryString["size"], out pageSize))
            {
                pageSize = 10;
            }
            int          num          = Globals.RequestQueryNum("status");
            BargainQuery bargainQuery = new BargainQuery();

            bargainQuery.Type      = num.ToString();
            bargainQuery.PageSize  = pageSize;
            bargainQuery.PageIndex = pageIndex;
            int           total       = BargainHelper.GetTotal(bargainQuery);
            DbQueryResult bargainList = BargainHelper.GetBargainList(bargainQuery);

            this.hiddTotal.Value           = ((DataTable)bargainList.Data).Rows.Count.ToString();
            this.hiddPageIndex.Value       = pageIndex.ToString();
            this.rpMyMemberList.DataSource = bargainList.Data;
            this.rpMyMemberList.DataBind();
        }
コード例 #11
0
 protected override void AttachChildControls()
 {
     if (DistributorsBrower.GetCurrentDistributors(Globals.GetCurrentMemberUserId(), true).ReferralStatus != 0)
     {
         HttpContext.Current.Response.Redirect("MemberCenter.aspx");
     }
     else
     {
         CommissionsQuery query;
         this.vshopcommssion = (VshopTemplatedRepeater)this.FindControl("vshopcommssion");
         query = new CommissionsQuery
         {
             StartTime = "",
             EndTime   = "",
             PageIndex = 1,
             PageSize  = 0x186a0,
             UserId    = Globals.GetCurrentMemberUserId()
         };
         DbQueryResult commissions = DistributorsBrower.GetCommissions(query);
         if (commissions.TotalRecords > 0)
         {
             this.vshopcommssion.DataSource = commissions.Data;
             this.vshopcommssion.DataBind();
         }
     }
 }
コード例 #12
0
 protected override void AttachChildControls()
 {
     this.replaceId = System.Convert.ToInt32(this.Page.Request.QueryString["ReplaceId"]);
     //this.RefundDetails = (Common_OrderManage_OrderItems)this.FindControl("Common_OrderManage_OrderItems");
     this.RefundDetails     = (VshopTemplatedRepeater)this.FindControl("rptOrderProducts");
     this.txtOrderId        = (System.Web.UI.WebControls.Literal) this.FindControl("txtOrderId");
     this.handleStatus      = (System.Web.UI.WebControls.Literal) this.FindControl("handleStatus");
     this.litAddDate        = (FormatedTimeLabel)this.FindControl("litAddDate");
     this.litRemark         = (System.Web.UI.WebControls.Literal) this.FindControl("litRemark");
     this.litAdminRemark    = (System.Web.UI.WebControls.Literal) this.FindControl("litAdminRemark");
     this.litWeight         = (System.Web.UI.WebControls.Literal) this.FindControl("litWeight");
     this.litUsername       = (System.Web.UI.WebControls.Literal) this.FindControl("litUsername");
     this.litShippingRegion = (System.Web.UI.WebControls.Literal) this.FindControl("litShippingRegion");
     this.litZipCode        = (System.Web.UI.WebControls.Literal) this.FindControl("litZipCode");
     this.litEmailAddress   = (System.Web.UI.WebControls.Literal) this.FindControl("litEmailAddress");
     this.litCellPhone      = (System.Web.UI.WebControls.Literal) this.FindControl("litCellPhone");
     this.litTelPhone       = (System.Web.UI.WebControls.Literal) this.FindControl("litTelPhone");
     this.litShipToDate     = (System.Web.UI.WebControls.Literal) this.FindControl("litShipToDate");
     this.litTotalPrice     = (FormatedMoneyLabel)this.FindControl("litTotalPrice");
     if (!this.Page.IsPostBack)
     {
         this.BindOrderReplace(this.replaceId);
         OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId);
         replaceInfo = TradeHelper.GetReplaceInfo(this.replaceId);
         if (orderInfo == null || orderInfo.UserId != HiContext.Current.User.UserId)
         {
             this.Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该订单不存在或者不属于当前用户的订单"));
             return;
         }
         this.BindOrderItems(orderInfo);
         this.BindRefunds(replaceInfo);
     }
 }
コード例 #13
0
        private Repeater rptordergifts;//礼品列表
        protected override void AttachChildControls()
        {
            PageTitle.AddSiteNameTitle("会员订单");
            int result = 0;

            int.TryParse(HttpContext.Current.Request.QueryString.Get("status"), out result);
            OrderQuery query = new OrderQuery();

            switch (result)
            {
            case 1:
                query.Status = OrderStatus.WaitBuyerPay;
                break;

            case 3:
                query.Status = OrderStatus.SellerAlreadySent;
                break;
            }

            DataSet userOrder = MemberProcessor.GetUserOrder(Globals.GetCurrentMemberUserId(), query);

            this.rptOrders = (VshopTemplatedRepeater)this.FindControl("rptOrders");
            this.rptOrders.ItemDataBound += new RepeaterItemEventHandler(this.rptOrders_ItemDataBound);
            this.rptOrders.DataSource     = userOrder;
            this.rptOrders.DataBind();

            /*
             * string orderids=string.Empty;
             * foreach(DataRow dr in userOrder.Tables[0].Rows)
             *  orderids+=string.Format("{0},",dr["orderid"].ToString());
             * orderids=orderids.TrimEnd(',');
             */
        }
コード例 #14
0
        protected override void AttachChildControls()
        {
            int        num;
            int        num2;
            MemberInfo currentMember = MemberProcessor.GetCurrentMember();

            this.rptProducts = (VshopTemplatedRepeater)this.FindControl("rptProducts");
            this.txtTotal    = (HtmlInputHidden)this.FindControl("txtTotal");
            if (!int.TryParse(this.Page.Request.QueryString["page"], out num))
            {
                num = 1;
            }
            if (!int.TryParse(this.Page.Request.QueryString["size"], out num2))
            {
                num2 = 20;
            }
            ProductConsultationAndReplyQuery consultationQuery = new ProductConsultationAndReplyQuery {
                UserId    = currentMember.UserId,
                IsCount   = true,
                PageIndex = num,
                PageSize  = num2,
                SortBy    = "ConsultationId",
                SortOrder = SortAction.Desc
            };
            DbQueryResult productConsultations = ProductBrowser.GetProductConsultations(consultationQuery);

            this.rptProducts.DataSource = productConsultations.Data;
            this.rptProducts.DataBind();
            this.txtTotal.SetWhenIsNotNull(productConsultations.TotalRecords.ToString());
            PageTitle.AddSiteNameTitle("商品咨询");
        }
コード例 #15
0
ファイル: VVote.cs プロジェクト: wuchao288/wexin
        protected override void AttachChildControls()
        {
            if (!int.TryParse(this.Page.Request.QueryString["voteId"], out this.voteId))
            {
                base.GotoResourceNotFound("");
            }
            this.litVoteName  = (Literal)this.FindControl("litVoteName");
            this.litVoteNum   = (Literal)this.FindControl("litVoteNum");
            this.rptVoteItems = (VshopTemplatedRepeater)this.FindControl("rptVoteItems");
            this.hidCheckNum  = (HtmlInputHidden)this.FindControl("hidCheckNum");
            this.divVoteOk    = (HtmlGenericControl)this.FindControl("divVoteOk");
            string    voteName = string.Empty;
            int       checkNum = 1;
            DataTable table    = VshopBrowser.GetVote(this.voteId, out voteName, out checkNum, out this.voteNum);

            if (table == null)
            {
                base.GotoResourceNotFound("");
            }
            this.LoadVoteItemTable(table);
            this.rptVoteItems.DataSource = table;
            this.rptVoteItems.DataBind();
            this.litVoteName.Text  = voteName;
            this.hidCheckNum.Value = checkNum.ToString();
            this.litVoteNum.Text   = string.Format("共有{0}人参与投票", this.voteNum);
            if (VshopBrowser.IsVote(this.voteId))
            {
                this.litVoteNum.Text   = this.litVoteNum.Text + "(您已投票)";
                this.divVoteOk.Visible = false;
            }
            PageTitle.AddSiteNameTitle("投票调查");
        }
コード例 #16
0
        protected override void AttachChildControls()
        {
            PageTitle.AddSiteNameTitle("下级分销商");
            this.rpdistributor = (VshopTemplatedRepeater)this.FindControl("rpdistributor");
            this.hiddTotal     = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("hiddTotal");
            DistributorsQuery distributorsQuery = new DistributorsQuery();

            distributorsQuery.PageIndex = 0;
            distributorsQuery.PageSize  = 10;
            DistributorsInfo currentDistributors = DistributorsBrower.GetCurrentDistributors(Globals.GetCurrentMemberUserId(), true);

            if (currentDistributors.ReferralStatus != 0)
            {
                System.Web.HttpContext.Current.Response.Redirect("MemberCenter.aspx");
            }
            else
            {
                distributorsQuery.GradeId = 3;
                int userId = 0;
                if (int.TryParse(this.Page.Request.QueryString["UserId"], out userId))
                {
                    distributorsQuery.UserId = userId;
                }
                distributorsQuery.ReferralPath = userId.ToString();
                int       num = 0;
                DataTable threeDistributors = DistributorsBrower.GetThreeDistributors(distributorsQuery, out num);
                this.hiddTotal.Value          = num.ToString();
                this.rpdistributor.DataSource = threeDistributors;
                this.rpdistributor.DataBind();
            }
        }
コード例 #17
0
        protected override void AttachChildControls()
        {
            string url = this.Page.Request.QueryString["returnUrl"];

            if (!string.IsNullOrWhiteSpace(this.Page.Request.QueryString["returnUrl"]))
            {
                this.Page.Response.Redirect(url);
            }
            string str2 = this.Page.Request.QueryString["status"];

            if (string.IsNullOrEmpty(str2))
            {
                str2 = "1";
            }
            MemberInfo currentMember = MemberProcessor.GetCurrentMember();
            int        num           = 0;

            int.TryParse(str2, out num);
            this.rptUseableCouponList = (VshopTemplatedRepeater)this.FindControl("rptUseableCouponList");

            this.rptCouponsAct              = (VshopTemplatedRepeater)this.FindControl("rptCouponsAct");
            this.rptCouponsAct.ItemCommand += new RepeaterCommandEventHandler(this.rptCouponsAct_ItemCommand);
            this.rptCouponsAct.DataSource   = CouponHelper.GetCouponsActNow();
            this.rptCouponsAct.DataBind();

            DataTable dtData = VshopBrowser.GetLotteryActivity_Valid(0, currentMember.UserId);

            this.rptUseableCouponList.DataSource = dtData;
            this.rptUseableCouponList.DataBind();

            PageTitle.AddSiteNameTitle("微信红包活动");
        }
コード例 #18
0
        protected override void AttachChildControls()
        {
            PageTitle.AddSiteNameTitle("下级分销商");
            this.onedistributor = (Panel)this.FindControl("onedistributor");
            this.twodistributor = (Panel)this.FindControl("twodistributor");
            this.rpdistributor  = (VshopTemplatedRepeater)this.FindControl("rpdistributor");
            DistributorsQuery query = new DistributorsQuery {
                PageIndex = 1,
                PageSize  = 0x2710
            };
            DistributorsInfo currentDistributors = DistributorsBrower.GetCurrentDistributors(Globals.GetCurrentMemberUserId());

            query.GradeId = 2;
            this.twodistributor.Visible = false;
            int result = 0;

            if (int.TryParse(this.Page.Request.QueryString["gradeId"], out result))
            {
                query.GradeId = result;
            }
            query.ReferralPath            = currentDistributors.UserId.ToString();
            query.UserId                  = currentDistributors.UserId;
            this.rpdistributor.DataSource = DistributorsBrower.GetDownDistributors(query);
            this.rpdistributor.DataBind();
        }
コード例 #19
0
        protected override void AttachChildControls()
        {
            this.litShipTo    = (System.Web.UI.WebControls.Literal) this.FindControl("litShipTo");
            this.litCellPhone = (System.Web.UI.WebControls.Literal) this.FindControl("litCellPhone");
            this.litAddress   = (System.Web.UI.WebControls.Literal) this.FindControl("litAddress");
            this.rptAddress   = (VshopTemplatedRepeater)this.FindControl("rptAddress");
            System.Collections.Generic.IList <ShippingAddressInfo> shippingAddresses = MemberProcessor.GetShippingAddresses();
            this.rptAddress.DataSource = from item in shippingAddresses
                                         orderby item.IsDefault
                                         select item;

            this.rptAddress.DataBind();
            this.litAddAddress = (System.Web.UI.WebControls.Literal) this.FindControl("litAddAddress");
            this.selectShipTo  = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("selectShipTo");
            this.regionId      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("regionId");
            ShippingAddressInfo shippingAddressInfo = shippingAddresses.FirstOrDefault((ShippingAddressInfo item) => item.IsDefault);

            if (shippingAddressInfo == null)
            {
                shippingAddressInfo = ((shippingAddresses.Count > 0) ? shippingAddresses[0] : null);
            }
            if (shippingAddressInfo != null)
            {
                this.litShipTo.Text    = shippingAddressInfo.ShipTo;
                this.litCellPhone.Text = shippingAddressInfo.CellPhone;
                this.litAddress.Text   = shippingAddressInfo.Address;
                this.selectShipTo.SetWhenIsNotNull(shippingAddressInfo.ShippingId.ToString());
                this.regionId.SetWhenIsNotNull(shippingAddressInfo.RegionId.ToString());
            }
            this.litAddAddress.Text = " href='/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(System.Web.HttpContext.Current.Request.Url.ToString()) + "'";
            PageTitle.AddSiteNameTitle("中奖记录");
        }
コード例 #20
0
 protected override void AttachChildControls()
 {
     this.returnsId = System.Convert.ToInt32(this.Page.Request.QueryString["ReturnsId"]);
     //this.RefundDetails = (Common_OrderManage_OrderItems)this.FindControl("Common_OrderManage_OrderItems");
     this.RefundDetails          = (VshopTemplatedRepeater)this.FindControl("rptOrderProducts");
     this.txtOrderId             = (System.Web.UI.WebControls.Literal) this.FindControl("txtOrderId");
     this.handleStatus           = (System.Web.UI.WebControls.Literal) this.FindControl("handleStatus");
     this.litAddDate             = (FormatedTimeLabel)this.FindControl("litAddDate");
     this.litRemark              = (System.Web.UI.WebControls.Literal) this.FindControl("litRemark");
     this.litAdminRemark         = (System.Web.UI.WebControls.Literal) this.FindControl("litAdminRemark");
     this.litWeight              = (System.Web.UI.WebControls.Literal) this.FindControl("litWeight");
     this.litType                = (System.Web.UI.WebControls.Literal) this.FindControl("litType");
     this.litTotalPrice          = (FormatedMoneyLabel)this.FindControl("litTotalPrice");
     this.litRefundTotal         = (FormatedMoneyLabel)this.FindControl("litRefundTotal");
     this.litOrderTotal          = (FormatedMoneyLabel)this.FindControl("litOrderTotal");
     this.litLogisticsCompany    = (System.Web.UI.WebControls.Literal) this.FindControl("litLogisticsCompany");
     this.litLogisticsId         = (System.Web.UI.WebControls.Literal) this.FindControl("litLogisticsId");
     this.litFeeAffiliation      = (System.Web.UI.WebControls.Literal) this.FindControl("litFeeAffiliation");
     this.litExpressFee          = (System.Web.UI.WebControls.Literal) this.FindControl("litExpressFee");
     this.litCustomsClearanceFee = (System.Web.UI.WebControls.Literal) this.FindControl("litCustomsClearanceFee");
     if (!this.Page.IsPostBack)
     {
         this.BindReturnsTable(this.returnsId);
         OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId);
         returnsInfo = TradeHelper.GetReturnsInfo(this.returnsId);
         if (returnsInfo == null || returnsInfo.Username != HiContext.Current.User.Username)
         {
             this.Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该订单不存在或者不属于当前用户的订单"));
             return;
         }
         this.BindOrderItems(orderInfo);
         this.BindRefunds(returnsInfo);
     }
 }
コード例 #21
0
ファイル: VDistributorOrders.cs プロジェクト: wuchao288/wexin
        protected override void AttachChildControls()
        {
            this.vshoporders  = (VshopTemplatedRepeater)this.FindControl("vshoporders");
            this.litfinishnum = (Literal)this.FindControl("litfinishnum");
            this.litallnum    = (Literal)this.FindControl("litallnum");
            int result = 0;

            int.TryParse(HttpContext.Current.Request.QueryString.Get("status"), out result);
            OrderQuery query = new OrderQuery {
                UserId = new int?(Globals.GetCurrentMemberUserId())
            };

            if (result != 5)
            {
                query.Status           = OrderStatus.Finished;
                this.litfinishnum.Text = DistributorsBrower.GetDistributorOrderCount(query).ToString();
                query.Status           = OrderStatus.All;
                this.litallnum.Text    = DistributorsBrower.GetDistributorOrderCount(query).ToString();
            }
            else
            {
                this.litallnum.Text    = DistributorsBrower.GetDistributorOrderCount(query).ToString();
                query.Status           = OrderStatus.Finished;
                this.litfinishnum.Text = DistributorsBrower.GetDistributorOrderCount(query).ToString();
            }
            this.vshoporders.DataSource = DistributorsBrower.GetDistributorOrder(query);
            this.vshoporders.DataBind();
        }
コード例 #22
0
        protected override void AttachChildControls()
        {
            this.txtTotal      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            this.txtShowTabNum = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtShowTabNum");
            int pageIndex;

            if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex))
            {
                pageIndex = 1;
            }
            int pageSize;

            if (!int.TryParse(this.Page.Request.QueryString["size"], out pageSize))
            {
                pageSize = 10;
            }
            OrderQuery orderQuery = new OrderQuery();

            orderQuery.PageIndex = pageIndex;
            orderQuery.PageSize  = pageSize;
            orderQuery.SortBy    = "OrderDate";
            orderQuery.SortOrder = SortAction.Desc;
            DistributorsInfo userIdDistributors = DistributorsBrower.GetUserIdDistributors(Globals.GetCurrentMemberUserId(false));

            if (userIdDistributors == null)
            {
                System.Web.HttpContext.Current.Response.Redirect("MemberCenter.aspx");
            }
            else if (userIdDistributors.ReferralStatus != 0)
            {
                System.Web.HttpContext.Current.Response.Redirect("MemberCenter.aspx");
            }
            else
            {
                this.vshoporders  = (VshopTemplatedRepeater)this.FindControl("vshoporders");
                this.litfinishnum = (System.Web.UI.WebControls.Literal) this.FindControl("litfinishnum");
                this.litallnum    = (System.Web.UI.WebControls.Literal) this.FindControl("litallnum");
                PageTitle.AddSiteNameTitle("店铺订单");
                int num = 0;
                int.TryParse(System.Web.HttpContext.Current.Request.QueryString.Get("status"), out num);
                orderQuery.UserId = new int?(Globals.GetCurrentMemberUserId(false));
                if (num != 5)
                {
                    orderQuery.Status      = OrderStatus.Finished;
                    this.litfinishnum.Text = DistributorsBrower.GetDistributorOrderCount(orderQuery).ToString();
                    orderQuery.Status      = OrderStatus.All;
                    this.litallnum.Text    = DistributorsBrower.GetDistributorOrderCount(orderQuery).ToString();
                }
                else
                {
                    this.litallnum.Text    = DistributorsBrower.GetDistributorOrderCount(orderQuery).ToString();
                    orderQuery.Status      = OrderStatus.Finished;
                    this.litfinishnum.Text = DistributorsBrower.GetDistributorOrderCount(orderQuery).ToString();
                }
                this.vshoporders.ItemDataBound += new System.Web.UI.WebControls.RepeaterItemEventHandler(this.vshoporders_ItemDataBound);
                DataSet distributorOrder = DistributorsBrower.GetDistributorOrder(orderQuery);
                this.vshoporders.DataSource = distributorOrder;
                this.vshoporders.DataBind();
            }
        }
コード例 #23
0
        private Literal lblKeyWord;       //搜索内容

        protected override void AttachChildControls()
        {
            int num;
            int num2;
            int num3;

            int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId);
            this.keyWord = this.Page.Request.QueryString["keyWord"];
            if (!string.IsNullOrWhiteSpace(this.keyWord))
            {
                this.keyWord = this.keyWord.Trim();
            }
            this.imgUrl        = (HiImage)this.FindControl("imgUrl");
            this.litContent    = (Literal)this.FindControl("litContent");
            this.hdProductList = (Literal)this.FindControl("hdProductList");
            this.rptCategories = (VshopTemplatedRepeater)this.FindControl("rptCategories");
            this.txtTotalPages = (HtmlInputHidden)this.FindControl("txtTotal");

            this.lblSortFiled     = (Literal)this.FindControl("lblSortFiled");
            this.lblSortDirection = (Literal)this.FindControl("lblSortDirection");
            this.lblKeyWord       = (Literal)this.FindControl("lblKeyWord");

            string str = this.Page.Request.QueryString["sort"];

            if (string.IsNullOrWhiteSpace(str))
            {
                str = "DisplaySequence";
            }
            string str2 = this.Page.Request.QueryString["order"];

            if (string.IsNullOrWhiteSpace(str2))
            {
                str2 = "desc";
            }

            this.lblSortFiled.Text     = str;
            this.lblSortDirection.Text = str2;

            if (!int.TryParse(this.Page.Request.QueryString["page"], out num))
            {
                num = 1;
            }
            if (!int.TryParse(this.Page.Request.QueryString["size"], out num2))
            {
                num2 = 50;
            }

            IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxMainCategories(100);

            this.rptCategories.DataSource = maxSubCategories;
            this.rptCategories.DataBind();

            lblKeyWord.Text = keyWord;

            DataTable dt = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, new int?(this.categoryId), this.keyWord, num, num2, out num3, str, str2);

            this.hdProductList.Text = JsonConvert.SerializeObject(dt);
            this.txtTotalPages.SetWhenIsNotNull(num3.ToString());
            PageTitle.AddSiteNameTitle("商品列表");
        }
コード例 #24
0
ファイル: VBrandDetail.cs プロジェクト: llenroc/kangaroo
        protected override void AttachChildControls()
        {
            if (!int.TryParse(this.Page.Request.QueryString["BrandId"], out this.BrandId))
            {
                base.GotoResourceNotFound("");
            }
            this.imgUrl         = (HiImage)this.FindControl("imgUrl");
            this.rptProducts    = (VshopTemplatedRepeater)this.FindControl("rptProducts");
            this.litBrandDetail = (System.Web.UI.WebControls.Literal) this.FindControl("litBrandDetail");
            this.txtTotal       = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            BrandCategoryInfo brandCategory = CategoryBrowser.GetBrandCategory(this.BrandId);

            this.litBrandDetail.SetWhenIsNotNull(brandCategory.Description);
            this.imgUrl.ImageUrl = brandCategory.Logo;
            int pageNumber;

            if (!int.TryParse(this.Page.Request.QueryString["page"], out pageNumber))
            {
                pageNumber = 1;
            }
            int maxNum;

            if (!int.TryParse(this.Page.Request.QueryString["size"], out maxNum))
            {
                maxNum = 20;
            }
            int num;

            this.rptProducts.DataSource = ProductBrowser.GetBrandProducts(MemberProcessor.GetCurrentMember(), new int?(this.BrandId), pageNumber, maxNum, out num);
            this.rptProducts.DataBind();
            this.txtTotal.SetWhenIsNotNull(num.ToString());
            PageTitle.AddSiteNameTitle("品牌详情");
        }
コード例 #25
0
 private void FindControls()
 {
     this.rptProductImages      = (VshopTemplatedRepeater)this.FindControl("rptProductImages");
     this.litProdcutName        = (Literal)this.FindControl("litProdcutName");
     this.litShortDescription   = (Literal)this.FindControl("litShortDescription");
     this.litDescription        = (Literal)this.FindControl("litDescription");
     this.litSoldCount          = (Literal)this.FindControl("soldCount");
     this.litprice              = (Literal)this.FindControl("price");
     this.litcontent            = (Literal)this.FindControl("content");
     this.litminCount           = (Literal)this.FindControl("minCount");
     this.litGroupBuyId         = (HtmlInputControl)this.FindControl("litGroupbuyId");
     this.litLeftSeconds        = (Literal)this.FindControl("leftSeconds");
     this.skuSelector           = (Common_SKUSelector)this.FindControl("skuSelector");
     this.linkDescription       = (HyperLink)this.FindControl("linkDescription");
     this.expandAttr            = (Common_ExpandAttributes)this.FindControl("ExpandAttributes");
     this.salePrice             = (Literal)this.FindControl("salePrice");
     this.leftCount             = (Literal)this.FindControl("leftCount");
     this.minSuccessCount       = (Literal)this.FindControl("minSuccessCount");
     this.txtProductId          = (HtmlInputControl)this.FindControl("txtProductId");
     this.litConsultationsCount = (Literal)this.FindControl("litConsultationsCount");
     this.litReviewsCount       = (Literal)this.FindControl("litReviewsCount");
     this.litMaxCount           = (Literal)this.FindControl("litMaxCount");
     this.startTime             = (HtmlInputHidden)this.FindControl("startTime");
     this.endTime                = (HtmlInputHidden)this.FindControl("endTime");
     this.groupBuySoldCount      = (HtmlInputHidden)this.FindControl("groupBuySoldCount");
     this.groupBuyMinCount       = (HtmlInputHidden)this.FindControl("groupBuyMinCount");
     this.litGroupbuyDescription = (Literal)this.FindControl("litGroupbuyDescription");
     this.nowTime                = (HtmlInputHidden)this.FindControl("nowTime");
 }
コード例 #26
0
        protected override void AttachChildControls()
        {
            PageTitle.AddSiteNameTitle("下级分销商");
            this.rpdistributor = (VshopTemplatedRepeater)this.FindControl("rpdistributor");
            this.hiddTotal     = (HtmlInputHidden)this.FindControl("hiddTotal");
            DistributorsQuery query = new DistributorsQuery {
                PageIndex = 0,
                PageSize  = 10
            };

            if (DistributorsBrower.GetCurrentDistributors(Globals.GetCurrentMemberUserId(), true).ReferralStatus != 0)
            {
                HttpContext.Current.Response.Redirect("MemberCenter.aspx");
            }
            else
            {
                query.GradeId = 3;
                int result = 0;
                if (int.TryParse(this.Page.Request.QueryString["UserId"], out result))
                {
                    query.UserId = result;
                }
                query.ReferralPath = result.ToString();
                int       total             = 0;
                DataTable threeDistributors = DistributorsBrower.GetThreeDistributors(query, out total);
                this.hiddTotal.Value          = total.ToString();
                this.rpdistributor.DataSource = threeDistributors;
                this.rpdistributor.DataBind();
            }
        }
コード例 #27
0
ファイル: VCouponsActList.cs プロジェクト: tyriankid/WFX
 protected override void AttachChildControls()
 {
     this.rptCouponsAct            = (VshopTemplatedRepeater)this.FindControl("rptCouponsAct");
     this.rptCouponsAct.DataSource = CouponHelper.GetCouponsActNow();
     this.rptCouponsAct.DataBind();
     PageTitle.AddSiteNameTitle("优惠卷活动");
 }
コード例 #28
0
        protected override void AttachChildControls()
        {
            DistributorsInfo currentDistributors = DistributorsBrower.GetCurrentDistributors(true);

            if (currentDistributors.ReferralStatus != 0)
            {
                System.Web.HttpContext.Current.Response.Redirect("MemberCenter.aspx");
            }
            else
            {
                this.vshopbalancedraw = (VshopTemplatedRepeater)this.FindControl("vshopbalancedraw");
                BalanceDrawRequestQuery query = new BalanceDrawRequestQuery
                {
                    PageIndex        = 1,
                    PageSize         = 100000,
                    UserId           = currentDistributors.UserId.ToString(),
                    SortBy           = "SerialID",
                    RequestTime      = "",
                    RequestStartTime = "",
                    RequestEndTime   = "",
                    CheckTime        = "",
                    IsCheck          = "",
                    SortOrder        = SortAction.Desc
                };
                DbQueryResult balanceDrawRequest = DistributorsBrower.GetBalanceDrawRequest(query, null);
                if (balanceDrawRequest.TotalRecords > 0)
                {
                    this.vshopbalancedraw.DataSource = balanceDrawRequest.Data;
                    this.vshopbalancedraw.DataBind();
                }
            }
        }
コード例 #29
0
ファイル: VMyRanking.cs プロジェクト: sriramsoftware/wxshop
 protected override void AttachChildControls()
 {
     if (DistributorsBrower.GetCurrentDistributors(Globals.GetCurrentMemberUserId()).ReferralStatus != 0)
     {
         HttpContext.Current.Response.Redirect("MemberCenter.aspx");
     }
     else
     {
         string url = this.Page.Request.QueryString["returnUrl"];
         if (!string.IsNullOrWhiteSpace(this.Page.Request.QueryString["returnUrl"]))
         {
             this.Page.Response.Redirect(url);
         }
         MemberInfo currentMember = MemberProcessor.GetCurrentMember();
         this.liturl      = (Literal)this.FindControl("liturl");
         this.liturl.Text = Globals.HostPath(HttpContext.Current.Request.Url) + "/Default.aspx?ReferralId=" + currentMember.UserId;
         DataSet userRanking = DistributorsBrower.GetUserRanking(currentMember.UserId);
         this.rptMyRankingList     = (VshopTemplatedRepeater)this.FindControl("rptMyRankingList");
         this.rptMyTeamRankingList = (VshopTemplatedRepeater)this.FindControl("rptMyTeamRankingList");
         this.rptMyRanking         = (VshopTemplatedRepeater)this.FindControl("rptMyRanking");
         if (userRanking.Tables.Count == 3)
         {
             this.rptMyRanking.DataSource = userRanking.Tables[0];
             this.rptMyRanking.DataBind();
             this.rptMyRankingList.DataSource = userRanking.Tables[1];
             this.rptMyRankingList.DataBind();
             this.rptMyTeamRankingList.DataSource = userRanking.Tables[2];
             this.rptMyTeamRankingList.DataBind();
         }
         PageTitle.AddSiteNameTitle("查看排名");
     }
 }
コード例 #30
0
 protected override void AttachChildControls()
 {
     this.rptBrands            = (VshopTemplatedRepeater)this.FindControl("rptBrands");
     this.rptBrands.DataSource = CategoryBrowser.GetBrandCategories(0, 1000);
     this.rptBrands.DataBind();
     PageTitle.AddSiteNameTitle("品牌列表");
 }