示例#1
0
 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("团购搜索页");
 }
示例#2
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("商品咨询");
 }
示例#3
0
 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("投票调查");
 }
示例#4
0
 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();
 }
 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");
 }
示例#6
0
        protected override void AttachChildControls()
        {
            CommissionsQuery query;
            this.vshopcommssion = (VshopTemplatedRepeater)this.FindControl("vshopcommssion");
            //query = new CommissionsQuery {
            //    StartTime = query.EndTime = "",
            //    PageIndex = 1,
            //    PageSize = 0x186a0,
            //    UserId = MemberProcessor.GetCurrentMember().UserId
            //};

            query = new CommissionsQuery();

            query.StartTime = query.EndTime = "";
            query.PageIndex = 1;
            query.PageSize = 0x186a0;
            query.UserId = MemberProcessor.GetCurrentMember().UserId;

            DbQueryResult commissions = DistributorsBrower.GetCommissions(query);
            if (commissions.TotalRecords > 0)
            {
                this.vshopcommssion.DataSource = commissions.Data;
                this.vshopcommssion.DataBind();
            }
        }
示例#7
0
 protected override void AttachChildControls()
 {
     int num;
     int num2;
     int num3;
     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 = (Literal) this.FindControl("litBrandDetail");
     this.txtTotal = (HtmlInputHidden) this.FindControl("txtTotal");
     BrandCategoryInfo brandCategory = CatalogHelper.GetBrandCategory(this.BrandId);
     this.litBrandDetail.SetWhenIsNotNull(brandCategory.Description);
     this.imgUrl.ImageUrl = brandCategory.Logo;
     if (!int.TryParse(this.Page.Request.QueryString["page"], out num))
     {
         num = 1;
     }
     if (!int.TryParse(this.Page.Request.QueryString["size"], out num2))
     {
         num2 = 20;
     }
     this.rptProducts.DataSource = ProductBrowser.GetBrandProducts(MemberProcessor.GetCurrentMember(), new int?(this.BrandId), num, num2, out num3);
     this.rptProducts.DataBind();
     this.txtTotal.SetWhenIsNotNull(num3.ToString());
     PageTitle.AddSiteNameTitle("品牌详情");
 }
 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());
     if (currentDistributors.DistributorGradeId == DistributorGrade.OneDistributor)
     {
         query.GradeId = 2;
         this.twodistributor.Visible = false;
     }
     else
     {
         query.GradeId = 3;
         this.onedistributor.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.GetDistributorsCommission(query);
     this.rpdistributor.DataBind();
 }
示例#9
0
 protected override void AttachChildControls()
 {
     this.refriendscircle = (VshopTemplatedRepeater) this.FindControl("refriendscircle");
     this.pager = (Pager) this.FindControl("pager");
     this.refriendscircle.ItemDataBound += new RepeaterItemEventHandler(this.refriendscircle_ItemDataBound);
     this.BindData();
     PageTitle.AddSiteNameTitle("朋友圈分享");
 }
示例#10
0
 protected override void AttachChildControls()
 {
     MemberInfo currentMember = MemberProcessor.GetCurrentMember();
     this.rptBrands = (VshopTemplatedRepeater) this.FindControl("rptBrands");
     this.rptBrands.DataSource = CategoryBrowser.GetBrandCategories();
     this.rptBrands.DataBind();
     PageTitle.AddSiteNameTitle("品牌列表");
 }
示例#11
0
 protected override void AttachChildControls()
 {
     this.rptProducts = (VshopTemplatedRepeater) this.FindControl("rptProducts");
     this.img = (HtmlImage) this.FindControl("imgDefaultBg");
     this.pager = (Pager) this.FindControl("pager");
     this.litstorename = (Literal) this.FindControl("litstorename");
     this.litdescription = (Literal) this.FindControl("litdescription");
     this.imgback = (HiImage) this.FindControl("imgback");
     this.imglogo = (HiImage) this.FindControl("imglogo");
     this.Page.Session["stylestatus"] = "3";
     SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
     PageTitle.AddSiteNameTitle(masterSettings.SiteName);
     this.litstorename.Text = masterSettings.SiteName;
     this.litdescription.Text = masterSettings.ShopIntroduction;
     if (base.referralId <= 0)
     {
         HttpCookie cookie = HttpContext.Current.Request.Cookies["Vshop-ReferralId"];
         if (!((cookie == null) || string.IsNullOrEmpty(cookie.Value)))
         {
             base.referralId = int.Parse(cookie.Value);
         }
     }
     DistributorsInfo userIdDistributors = new DistributorsInfo();
     userIdDistributors = DistributorsBrower.GetUserIdDistributors(base.referralId);
     if ((userIdDistributors != null) && (userIdDistributors.UserId > 0))
     {
         PageTitle.AddSiteNameTitle(userIdDistributors.StoreName);
         this.litdescription.Text = userIdDistributors.StoreDescription;
         this.litstorename.Text = userIdDistributors.StoreName;
         if (userIdDistributors.Logo != "")
         {
             this.imglogo.ImageUrl = userIdDistributors.Logo;
         }
         this.imgback.ImageUrl = userIdDistributors.BackImage;
     }
     if (this.rptProducts != null)
     {
         ProductQuery query = new ProductQuery {
             PageSize = this.pager.PageSize,
             PageIndex = this.pager.PageIndex
         };
         DbQueryResult homeProduct = ProductBrowser.GetHomeProduct(MemberProcessor.GetCurrentMember(), query);
         this.rptProducts.DataSource = homeProduct.Data;
         this.rptProducts.DataBind();
         this.pager.TotalRecords = homeProduct.TotalRecords;
         if (this.pager.TotalRecords <= this.pager.PageSize)
         {
             this.pager.Visible = false;
         }
     }
     if (this.img != null)
     {
         this.img.Src = new VTemplateHelper().GetDefaultBg();
     }
 }
示例#12
0
 protected override void AttachChildControls()
 {
     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.txtkeywords = (HtmlInputText) this.FindControl("keywords");
     this.rpChooseProducts = (VshopTemplatedRepeater) this.FindControl("rpChooseProducts");
     this.rpCategorys = (VshopTemplatedRepeater) this.FindControl("rpCategorys");
     this.DataBindSoruce();
 }
示例#13
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);
     }
     MemberInfo currentMember = MemberProcessor.GetCurrentMember();
     this.rptProducts = (VshopTemplatedRepeater) this.FindControl("rptProducts");
     this.rptProducts.DataSource = ProductBrowser.GetFavorites(currentMember);
     this.rptProducts.DataBind();
     PageTitle.AddSiteNameTitle("我的收藏");
 }
示例#14
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 = (Literal) this.FindControl("litContent");
     this.rptProducts = (VshopTemplatedRepeater) this.FindControl("rptProducts");
     this.rptCategories = (VshopTemplatedRepeater) this.FindControl("rptCategories");
     IList<CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 0x3e8);
     this.rptCategories.DataSource = maxSubCategories;
     this.rptCategories.DataBind();
     PageTitle.AddSiteNameTitle("分类搜索页");
 }
示例#15
0
 protected override void AttachChildControls()
 {
     this.rptCartProducts = (VshopTemplatedRepeater) this.FindControl("rptCartProducts");
     this.litTotal = (Literal) this.FindControl("litTotal");
     this.divShowTotal = (HtmlGenericControl) this.FindControl("divShowTotal");
     this.aLink = (HtmlAnchor) this.FindControl("aLink");
     this.Page.Session["stylestatus"] = "0";
     ShoppingCartInfo shoppingCart = ShoppingCartProcessor.GetShoppingCart();
     if (shoppingCart != null)
     {
         this.rptCartProducts.DataSource = shoppingCart.LineItems;
         this.rptCartProducts.DataBind();
         this.litTotal.Text = shoppingCart.GetAmount().ToString("F2");
     }
     PageTitle.AddSiteNameTitle("购物车");
 }
示例#16
0
 protected override void AttachChildControls()
 {
     this.orderId = this.Page.Request.QueryString["orderId"];
     this.litShipTo = (Literal) this.FindControl("litShipTo");
     this.litPhone = (Literal) this.FindControl("litPhone");
     this.litAddress = (Literal) this.FindControl("litAddress");
     this.litOrderId = (Literal) this.FindControl("litOrderId");
     this.litOrderDate = (Literal) this.FindControl("litOrderDate");
     this.litOrderStatus = (OrderStatusLabel) this.FindControl("litOrderStatus");
     this.rptOrderProducts = (VshopTemplatedRepeater) this.FindControl("rptOrderProducts");
     this.litTotalPrice = (Literal) this.FindControl("litTotalPrice");
     this.litPayTime = (Literal) this.FindControl("litPayTime");
     this.orderStatus = (HtmlInputHidden) this.FindControl("orderStatus");
     this.txtOrderId = (HtmlInputHidden) this.FindControl("txtOrderId");
     this.litRemark = (Literal) this.FindControl("litRemark");
     this.litShipToDate = (Literal) this.FindControl("litShipToDate");
     this.litShippingCost = (Literal) this.FindControl("litShippingCost");
     this.litCounponPrice = (Literal) this.FindControl("litCounponPrice");
     this.litBuildPrice = (Literal) this.FindControl("litBuildPrice");
     this.litDisCountPrice = (Literal) this.FindControl("litDisCountPrice");
     this.litActualPrice = (Literal) this.FindControl("litActualPrice");
     OrderInfo orderInfo = ShoppingProcessor.GetOrderInfo(this.orderId);
     if (orderInfo == null)
     {
         base.GotoResourceNotFound("此订单已不存在");
     }
     this.litShipTo.Text = orderInfo.ShipTo;
     this.litPhone.Text = orderInfo.CellPhone;
     this.litAddress.Text = orderInfo.ShippingRegion + orderInfo.Address;
     this.litOrderId.Text = this.orderId;
     this.litOrderDate.Text = orderInfo.OrderDate.ToString();
     this.litTotalPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2"));
     this.litOrderStatus.OrderStatusCode = orderInfo.OrderStatus;
     this.litPayTime.SetWhenIsNotNull(orderInfo.PayDate.HasValue ? orderInfo.PayDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "");
     this.orderStatus.SetWhenIsNotNull(((int) orderInfo.OrderStatus).ToString());
     this.txtOrderId.SetWhenIsNotNull(this.orderId.ToString());
     this.litCounponPrice.SetWhenIsNotNull(orderInfo.CouponValue.ToString("F2"));
     this.litShippingCost.SetWhenIsNotNull(orderInfo.AdjustedFreight.ToString("F2"));
     this.litShipToDate.SetWhenIsNotNull(orderInfo.ShipToDate);
     this.litBuildPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2"));
     this.litDisCountPrice.SetWhenIsNotNull(orderInfo.AdjustedDiscount.ToString("F2"));
     this.litActualPrice.SetWhenIsNotNull(orderInfo.TotalPrice.ToString("F2"));
     this.litRemark.SetWhenIsNotNull(orderInfo.Remark);
     this.rptOrderProducts.DataSource = orderInfo.LineItems.Values;
     this.rptOrderProducts.DataBind();
     PageTitle.AddSiteNameTitle("订单详情");
 }
示例#17
0
 protected override void AttachChildControls()
 {
     this.rptvShipping = (VshopTemplatedRepeater) this.FindControl("rptvShipping");
     this.aLinkToAdd = (HtmlAnchor) this.FindControl("aLinkToAdd");
     this.aLinkToAdd.HRef = Globals.ApplicationPath + "/Vshop/AddShippingAddress.aspx";
     if (!string.IsNullOrEmpty(this.Page.Request.QueryString["returnUrl"]))
     {
         this.aLinkToAdd.HRef = this.aLinkToAdd.HRef + "?returnUrl=" + Globals.UrlEncode(this.Page.Request.QueryString["returnUrl"]);
     }
     IList<ShippingAddressInfo> shippingAddresses = MemberProcessor.GetShippingAddresses();
     if (shippingAddresses != null)
     {
         this.rptvShipping.DataSource = shippingAddresses;
         this.rptvShipping.DataBind();
     }
     PageTitle.AddSiteNameTitle("收货地址");
 }
 protected override void AttachChildControls()
 {
     int num;
     int num2;
     if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId))
     {
         base.GotoResourceNotFound("");
     }
     ProductConsultationAndReplyQuery consultationQuery = new ProductConsultationAndReplyQuery();
     if (!int.TryParse(this.Page.Request.QueryString["page"], out num))
     {
         num = 1;
     }
     if (!int.TryParse(this.Page.Request.QueryString["size"], out num2))
     {
         num2 = 20;
     }
     consultationQuery.ProductId = this.productId;
     consultationQuery.IsCount = true;
     consultationQuery.PageIndex = num;
     consultationQuery.PageSize = num2;
     consultationQuery.SortBy = "ConsultationId";
     consultationQuery.SortOrder = SortAction.Desc;
     consultationQuery.HasReplied = true;
     this.rptProducts = (VshopTemplatedRepeater) this.FindControl("rptProducts");
     this.txtTotal = (HtmlInputHidden) this.FindControl("txtTotal");
     DbQueryResult productConsultations = ProductBrowser.GetProductConsultations(consultationQuery);
     this.rptProducts.DataSource = productConsultations.Data;
     this.rptProducts.DataBind();
     this.txtTotal.SetWhenIsNotNull(productConsultations.TotalRecords.ToString());
     this.litProductTitle = (Literal) this.FindControl("litProductTitle");
     this.litShortDescription = (Literal) this.FindControl("litShortDescription");
     this.litSoldCount = (Literal) this.FindControl("litSoldCount");
     this.litSalePrice = (Literal) this.FindControl("litSalePrice");
     this.imgProductImage = (HtmlImage) this.FindControl("imgProductImage");
     ProductInfo product = ProductBrowser.GetProduct(MemberProcessor.GetCurrentMember(), this.productId);
     this.litProductTitle.SetWhenIsNotNull(product.ProductName);
     this.litShortDescription.SetWhenIsNotNull(product.ShortDescription);
     this.litSoldCount.SetWhenIsNotNull(product.ShowSaleCounts.ToString());
     this.litSalePrice.SetWhenIsNotNull(product.MinSalePrice.ToString("F2"));
     this.imgProductImage.Src = product.ThumbnailUrl60;
     PageTitle.AddSiteNameTitle("商品咨询");
 }
示例#19
0
 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.rptProducts = (VshopTemplatedRepeater) this.FindControl("rptProducts");
     this.rptCategories = (VshopTemplatedRepeater) this.FindControl("rptCategories");
     this.txtTotalPages = (HtmlInputHidden) this.FindControl("txtTotal");
     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";
     }
     if (!int.TryParse(this.Page.Request.QueryString["page"], out num))
     {
         num = 1;
     }
     if (!int.TryParse(this.Page.Request.QueryString["size"], out num2))
     {
         num2 = 20;
     }
     IList<CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 0x3e8);
     this.rptCategories.DataSource = maxSubCategories;
     this.rptCategories.DataBind();
     this.rptProducts.DataSource = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, new int?(this.categoryId), this.keyWord, num, num2, out num3, str, str2);
     this.rptProducts.DataBind();
     this.txtTotalPages.SetWhenIsNotNull(num3.ToString());
     PageTitle.AddSiteNameTitle("分类搜索页");
 }
示例#20
0
        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;
            }
            this.rptOrders = (VshopTemplatedRepeater) this.FindControl("rptOrders");
            this.rptOrders.DataSource = MemberProcessor.GetUserOrder(Globals.GetCurrentMemberUserId(), query);
            this.rptOrders.DataBind();
        }
示例#21
0
 protected override void AttachChildControls()
 {
     if (!int.TryParse(this.Page.Request.QueryString["TopicId"], out this.topicId))
     {
         base.GotoResourceNotFound("");
     }
     this.imgUrl = (HiImage) this.FindControl("imgUrl");
     this.litContent = (Literal) this.FindControl("litContent");
     this.rptProducts = (VshopTemplatedRepeater) this.FindControl("rptProducts");
     TopicInfo topic = VshopBrowser.GetTopic(this.topicId);
     if (topic == null)
     {
         base.GotoResourceNotFound("");
     }
     this.imgUrl.ImageUrl = topic.IconUrl;
     this.litContent.Text = topic.Content;
     this.rptProducts.DataSource = ProductBrowser.GetTopicProducts(MemberProcessor.GetCurrentMember(), this.topicId, new VTemplateHelper().GetTopicProductMaxNum());
     this.rptProducts.DataBind();
     PageTitle.AddSiteNameTitle("专题详情");
 }
 protected override void AttachChildControls()
 {
     this.vshopbalancedraw = (VshopTemplatedRepeater) this.FindControl("vshopbalancedraw");
     BalanceDrawRequestQuery query = new BalanceDrawRequestQuery {
         PageIndex = 1,
         PageSize = 0x186a0,
         UserId = DistributorsBrower.GetCurrentDistributors().UserId.ToString(),
         SortBy = "SerialID",
         RequestTime = "",
         RequestStartTime = "",
         RequestEndTime = "",
         CheckTime = "",
         IsCheck = "",
         SortOrder = SortAction.Desc
     };
     DbQueryResult balanceDrawRequest = DistributorsBrower.GetBalanceDrawRequest(query);
     if (balanceDrawRequest.TotalRecords > 0)
     {
         this.vshopbalancedraw.DataSource = balanceDrawRequest.Data;
         this.vshopbalancedraw.DataBind();
     }
 }
示例#23
0
 protected override void AttachChildControls()
 {
     this.litShipTo = (Literal) this.FindControl("litShipTo");
     this.litCellPhone = (Literal) this.FindControl("litCellPhone");
     this.litAddress = (Literal) this.FindControl("litAddress");
     this.rptCartProducts = (VshopTemplatedRepeater) this.FindControl("rptCartProducts");
     this.dropShippingType = (Common_ShippingTypeSelect) this.FindControl("dropShippingType");
     this.dropCoupon = (Common_CouponSelect) this.FindControl("dropCoupon");
     this.litOrderTotal = (Literal) this.FindControl("litOrderTotal");
     this.hiddenCartTotal = (HtmlInputHidden) this.FindControl("hiddenCartTotal");
     this.aLinkToShipping = (HtmlAnchor) this.FindControl("aLinkToShipping");
     this.groupbuyHiddenBox = (HtmlInputControl) this.FindControl("groupbuyHiddenBox");
     this.rptAddress = (VshopTemplatedRepeater) this.FindControl("rptAddress");
     this.selectShipTo = (HtmlInputHidden) this.FindControl("selectShipTo");
     this.regionId = (HtmlInputHidden) this.FindControl("regionId");
     Literal literal = (Literal) this.FindControl("litProductTotalPrice");
     this.litAddAddress = (Literal) this.FindControl("litAddAddress");
     IList<ShippingAddressInfo> shippingAddresses = MemberProcessor.GetShippingAddresses();
     this.rptAddress.DataSource = from item in shippingAddresses
         orderby item.IsDefault
         select item;
     this.rptAddress.DataBind();
     ShippingAddressInfo info = shippingAddresses.FirstOrDefault<ShippingAddressInfo>(item => item.IsDefault);
     if (info == null)
     {
         info = (shippingAddresses.Count > 0) ? shippingAddresses[0] : null;
     }
     if (info != null)
     {
         this.litShipTo.Text = info.ShipTo;
         this.litCellPhone.Text = info.CellPhone;
         this.litAddress.Text = info.Address;
         this.selectShipTo.SetWhenIsNotNull(info.ShippingId.ToString());
         this.regionId.SetWhenIsNotNull(info.RegionId.ToString());
     }
     this.litAddAddress.Text = " href='/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString()) + "'";
     if ((shippingAddresses == null) || (shippingAddresses.Count == 0))
     {
         this.Page.Response.Redirect(Globals.ApplicationPath + "/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString()));
     }
     else
     {
         this.aLinkToShipping.HRef = Globals.ApplicationPath + "/Vshop/ShippingAddresses.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString());
         ShoppingCartInfo shoppingCart = null;
         if (((int.TryParse(this.Page.Request.QueryString["buyAmount"], out this.buyAmount) && !string.IsNullOrEmpty(this.Page.Request.QueryString["productSku"])) && !string.IsNullOrEmpty(this.Page.Request.QueryString["from"])) && ((this.Page.Request.QueryString["from"] == "signBuy") || (this.Page.Request.QueryString["from"] == "groupBuy")))
         {
             this.productSku = this.Page.Request.QueryString["productSku"];
             if (int.TryParse(this.Page.Request.QueryString["groupbuyId"], out this.groupBuyId))
             {
                 this.groupbuyHiddenBox.SetWhenIsNotNull(this.groupBuyId.ToString());
                 shoppingCart = ShoppingCartProcessor.GetGroupBuyShoppingCart(this.groupBuyId, this.productSku, this.buyAmount);
             }
             else
             {
                 shoppingCart = ShoppingCartProcessor.GetShoppingCart(this.productSku, this.buyAmount);
             }
         }
         else
         {
             shoppingCart = ShoppingCartProcessor.GetShoppingCart();
         }
         if (shoppingCart != null)
         {
             this.rptCartProducts.DataSource = shoppingCart.LineItems;
             this.rptCartProducts.DataBind();
             this.dropShippingType.ShoppingCartItemInfo = shoppingCart.LineItems;
             this.dropShippingType.RegionId = 0;
             this.dropShippingType.Weight = shoppingCart.Weight;
             this.dropCoupon.CartTotal = shoppingCart.GetTotal();
             this.hiddenCartTotal.Value = this.litOrderTotal.Text = literal.Text = shoppingCart.GetTotal().ToString("F2");
         }
         PageTitle.AddSiteNameTitle("订单确认");
     }
 }
示例#24
0
 protected override void AttachChildControls()
 {
     int num;
     int num2;
     if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId))
     {
         base.GotoResourceNotFound("");
     }
     this.litProdcutName = (Literal) this.FindControl("litProdcutName");
     this.litSalePrice = (Literal) this.FindControl("litSalePrice");
     this.litShortDescription = (Literal) this.FindControl("litShortDescription");
     this.litSoldCount = (Literal) this.FindControl("litSoldCount");
     this.productImage = (HtmlImage) this.FindControl("productImage");
     this.productLink = (HyperLink) this.FindControl("productLink");
     this.txtTotal = (HtmlInputHidden) this.FindControl("txtTotal");
     string str = this.Page.Request["OrderId"];
     string str2 = "";
     if (!string.IsNullOrEmpty(str))
     {
         OrderInfo orderInfo = ShoppingProcessor.GetOrderInfo(str);
         if ((orderInfo != null) && (orderInfo.ReferralUserId > 0))
         {
             str2 = "&&ReferralId=" + orderInfo.ReferralUserId;
         }
     }
     else if (Globals.GetCurrentDistributorId() > 0)
     {
         str2 = "&&ReferralId=" + Globals.GetCurrentDistributorId().ToString();
     }
     ProductInfo product = ProductBrowser.GetProduct(MemberProcessor.GetCurrentMember(), this.productId);
     this.litProdcutName.SetWhenIsNotNull(product.ProductName);
     this.litSalePrice.SetWhenIsNotNull(product.MinSalePrice.ToString("F2"));
     this.litShortDescription.SetWhenIsNotNull(product.ShortDescription);
     this.litSoldCount.SetWhenIsNotNull(product.ShowSaleCounts.ToString());
     this.productImage.Src = product.ThumbnailUrl180;
     this.productLink.NavigateUrl = "ProductDetails.aspx?ProductId=" + product.ProductId + str2;
     if (!int.TryParse(this.Page.Request.QueryString["page"], out num))
     {
         num = 1;
     }
     if (!int.TryParse(this.Page.Request.QueryString["size"], out num2))
     {
         num2 = 20;
     }
     ProductReviewQuery reviewQuery = new ProductReviewQuery {
         productId = this.productId,
         IsCount = true,
         PageIndex = num,
         PageSize = num2,
         SortBy = "ReviewId",
         SortOrder = SortAction.Desc
     };
     this.rptProducts = (VshopTemplatedRepeater) this.FindControl("rptProducts");
     DbQueryResult productReviews = ProductBrowser.GetProductReviews(reviewQuery);
     this.rptProducts.DataSource = productReviews.Data;
     this.rptProducts.DataBind();
     this.txtTotal.SetWhenIsNotNull(productReviews.TotalRecords.ToString());
     PageTitle.AddSiteNameTitle("商品评价");
 }