Example #1
0
 protected override void AttachChildControls()
 {
     int.TryParse(this.Page.Request.QueryString["modeId"], out this.paymentModeId);
     decimal.TryParse(this.Page.Request.QueryString["blance"], out this.balance);
     this.litUserName = (Literal) this.FindControl("litUserName");
     this.lblPaymentName = (Literal) this.FindControl("lblPaymentName");
     this.imgPayment = (HiImage) this.FindControl("imgPayment");
     this.lblBlance = (FormatedMoneyLabel) this.FindControl("lblBlance");
     this.litPayCharge = (Literal) this.FindControl("litPayCharge");
     this.btnConfirm = ButtonManager.Create(this.FindControl("btnConfirm"));
     PageTitle.AddSiteNameTitle("充值确认", HiContext.Current.Context);
     this.btnConfirm.Click += new EventHandler(this.btnConfirm_Click);
     if (!this.Page.IsPostBack)
     {
         if ((this.paymentModeId == 0) || (this.balance == 0M))
         {
             this.Page.Response.Redirect(Globals.GetSiteUrls().UrlData.FormatUrl("user_InpourRequest"));
         }
         else
         {
             PaymentModeInfo paymentMode = TradeHelper.GetPaymentMode(this.paymentModeId);
             this.litUserName.Text = HiContext.Current.User.Username;
             if (paymentMode != null)
             {
                 this.lblPaymentName.Text = paymentMode.Name;
                 this.lblBlance.Money = this.balance;
                 this.ViewState["PayCharge"] = paymentMode.CalcPayCharge(this.balance);
                 this.litPayCharge.Text = Globals.FormatMoney(paymentMode.CalcPayCharge(this.balance));
             }
         }
     }
 }
 protected override void AttachChildControls()
 {
     PageTitle.AddSiteNameTitle("分销中心");
     DistributorsInfo userIdDistributors = DistributorsBrower.GetUserIdDistributors(MemberProcessor.GetCurrentMember().UserId);
     if (userIdDistributors != null)
     {
         this.imglogo = (HiImage) this.FindControl("imglogo");
         this.litGrade = (DistributorGradeLitral) this.FindControl("litGrade");
         this.litStroeName = (Literal) this.FindControl("litStroeName");
         this.saletotal = (FormatedMoneyLabel) this.FindControl("saletotal");
         this.refrraltotal = (FormatedMoneyLabel) this.FindControl("refrraltotal");
         this.litStoreNum = (Literal) this.FindControl("litStoreNum");
         this.litdistirbutors = (Literal) this.FindControl("litdistirbutors");
         this.litQRcode = (Literal) this.FindControl("litQRcode");
         if (userIdDistributors.DistributorGradeId != DistributorGrade.ThreeDistributor)
         {
             this.litdistirbutors.Text = "<a href=\"ChirldrenDistributors.aspx\" class=\"list-group-item\">下级分销商<span class=\"glyphicon glyphicon-chevron-right\"></span></a>";
         }
         this.litQRcode.Text = "<a href=\"QRcode.aspx?ReferralId=" + userIdDistributors.UserId + "\" class=\"list-group-item\">店铺二维码<span class=\"glyphicon glyphicon-chevron-right\"></span></a>";
         this.litStroeName.Text = userIdDistributors.StoreName;
         this.refrraltotal.Money = userIdDistributors.ReferralBlance;
         this.saletotal.Money = userIdDistributors.OrdersTotal;
         this.litGrade.GradeId = userIdDistributors.DistributorGradeId;
         if (userIdDistributors.Logo != "")
         {
             this.imglogo.ImageUrl = userIdDistributors.Logo;
         }
         this.litStoreNum.Text = DistributorsBrower.GetDistributorNum(DistributorGrade.All).ToString();
     }
 }
Example #3
0
File: Pay.cs Project: davinx/himedi
 protected override void AttachChildControls()
 {
     this.lblOrderId = (Label) this.FindControl("lblOrderId");
     this.lblOrderAmount = (FormatedMoneyLabel) this.FindControl("lblOrderAmount");
     this.txtPassword = (TextBox) this.FindControl("txtPassword");
     this.litUseableBalance = (FormatedMoneyLabel) this.FindControl("litUseableBalance");
     this.btnPay = ButtonManager.Create(this.FindControl("btnPay"));
     this.orderId = this.Page.Request.QueryString["orderId"];
     PageTitle.AddSiteNameTitle("订单支付", HiContext.Current.Context);
     this.btnPay.Click += new EventHandler(this.btnPay_Click);
     if (string.IsNullOrEmpty(this.orderId))
     {
         base.GotoResourceNotFound();
     }
     if (!this.Page.IsPostBack)
     {
         Member user = Users.GetUser(HiContext.Current.User.UserId, false) as Member;
         if (!user.IsOpenBalance)
         {
             this.Page.Response.Redirect(Globals.ApplicationPath + string.Format("/user/OpenBalance.aspx?ReturnUrl={0}", HttpContext.Current.Request.Url));
         }
         OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId);
         if (!orderInfo.CheckAction(OrderActions.BUYER_PAY))
         {
             this.ShowMessage("当前的订单订单状态不是等待付款,所以不能支付", false);
             this.btnPay.Visible = false;
         }
         this.lblOrderId.Text = orderInfo.OrderId;
         this.lblOrderAmount.Money = orderInfo.GetTotal();
         this.litUseableBalance.Money = user.Balance - user.RequestBalance;
     }
 }
Example #4
0
 protected override void AttachChildControls()
 {
     this.litUserName = (Literal) this.FindControl("litUserName");
     this.litUserPoint = (Literal) this.FindControl("litUserPoint");
     this.litUserRank = (Literal) this.FindControl("litUserRank");
     this.litUserLink = (Literal) this.FindControl("litUserLink");
     this.litNoPayOrderNum = (Literal) this.FindControl("litNoPayOrderNum");
     this.litNoReplyLeaveWordNum = (Literal) this.FindControl("litNoReplyLeaveWordNum");
     this.litAccountAmount = (FormatedMoneyLabel) this.FindControl("litAccountAmount");
     this.litRequestBalance = (FormatedMoneyLabel) this.FindControl("litRequestBalance");
     this.litUseableBalance = (FormatedMoneyLabel) this.FindControl("litUseableBalance");
     this.hpOrder = (HyperLink) this.FindControl("hpOrder");
     this.hpMes = (HyperLink) this.FindControl("hpMes");
     this.hpRepay = (HyperLink) this.FindControl("hpRepaly");
     this.divBalance = (HtmlGenericControl) this.FindControl("divBalance");
     this.divOpenBalance = (HtmlGenericControl) this.FindControl("divOpenBalance");
     PageTitle.AddSiteNameTitle("用户中心首页", HiContext.Current.Context);
     if (!this.Page.IsPostBack)
     {
         Member user = Users.GetUser(HiContext.Current.User.UserId, false) as Member;
         if (!user.IsOpenBalance)
         {
             this.divBalance.Visible = false;
             this.divOpenBalance.Visible = true;
         }
         this.litUserPoint.Text = user.Points.ToString();
         this.litUserName.Text = user.Username;
         MemberGradeInfo memberGrade = PersonalHelper.GetMemberGrade(user.GradeId);
         if (memberGrade != null)
         {
             this.litUserRank.Text = memberGrade.Name;
         }
         int noPayOrderNum = 0;
         int noReadMessageNum = 0;
         int noReplyLeaveCommentNum = 0;
         PersonalHelper.GetStatisticsNum(out noPayOrderNum, out noReadMessageNum, out noReplyLeaveCommentNum);
         this.litNoPayOrderNum.Text = noPayOrderNum.ToString();
         this.litNoReplyLeaveWordNum.Text = noReplyLeaveCommentNum.ToString();
         this.hpMes.Text = noReadMessageNum.ToString();
         this.litAccountAmount.Money = user.Balance;
         this.litRequestBalance.Money = user.RequestBalance;
         this.litUseableBalance.Money = user.Balance - user.RequestBalance;
         if (noPayOrderNum > 0)
         {
             this.hpOrder.Visible = true;
             this.hpOrder.NavigateUrl = "UserOrders.aspx?orderStatus=" + 1;
         }
         this.hpMes.NavigateUrl = "UserReceivedMessages.aspx";
         if (noReplyLeaveCommentNum > 0)
         {
             this.hpRepay.Visible = true;
             this.hpRepay.NavigateUrl = "UserConsultations.aspx";
         }
         Uri url = HttpContext.Current.Request.Url;
         string str = (url.Port == 80) ? string.Empty : (":" + url.Port.ToString(CultureInfo.InvariantCulture));
         this.litUserLink.Text = string.Concat(new object[] { string.Format(CultureInfo.InvariantCulture, "{0}://{1}{2}", new object[] { url.Scheme, HiContext.Current.SiteSettings.SiteUrl, str }), Globals.ApplicationPath, "/?ReferralUserId=", HiContext.Current.User.UserId });
     }
 }
 protected override void AttachChildControls()
 {
     this.cartMoney = (FormatedMoneyLabel) this.FindControl("cartMoney");
     this.cartNum = (Literal) this.FindControl("cartNum");
     ShoppingCartInfo shoppingCart = ShoppingCartProcessor.GetShoppingCart();
     if ((shoppingCart != null) && ((shoppingCart.LineGifts.Count > 0) || (shoppingCart.LineItems.Count > 0)))
     {
         this.cartMoney.Money = shoppingCart.GetTotal();
         this.cartNum.Text = shoppingCart.Quantity.ToString();
     }
 }
Example #6
0
 protected override void AttachChildControls()
 {
     if (!int.TryParse(this.Page.Request.QueryString["giftId"], out this.giftId))
     {
         base.GotoResourceNotFound();
     }
     this.litGiftTite = (Literal) this.FindControl("litGiftTite");
     this.litGiftName = (Literal) this.FindControl("litGiftName");
     this.lblMarkerPrice = (FormatedMoneyLabel) this.FindControl("lblMarkerPrice");
     this.litNeedPoint = (Label) this.FindControl("litNeedPoint");
     this.litCurrentPoint = (Label) this.FindControl("litCurrentPoint");
     this.litShortDescription = (Literal) this.FindControl("litShortDescription");
     this.litDescription = (Literal) this.FindControl("litDescription");
     this.imgGiftImage = (HiImage) this.FindControl("imgGiftImage");
     this.btnChage = (Button) this.FindControl("btnChage");
     this.btnChage.Click += new EventHandler(this.btnChage_Click);
     GiftInfo gift = null;
     gift = ProductBrowser.GetGift(this.giftId);
     if (!this.Page.IsPostBack)
     {
         this.litGiftTite.Text = gift.Name;
         this.litGiftName.Text = gift.Name;
         this.lblMarkerPrice.Money = gift.MarketPrice;
         this.litNeedPoint.Text = gift.NeedPoint.ToString();
         this.litShortDescription.Text = gift.ShortDescription;
         this.litDescription.Text = gift.LongDescription;
         this.imgGiftImage.ImageUrl = gift.ThumbnailUrl310;
         this.LoadPageSearch(gift);
     }
     if (((HiContext.Current.User.UserRole == UserRole.Member) || (HiContext.Current.User.UserRole == UserRole.Underling)) && (gift.NeedPoint > 0))
     {
         this.btnChage.Enabled = true;
         this.btnChage.Text = "立即兑换";
         this.litCurrentPoint.Text = ((Member) HiContext.Current.User).Points.ToString();
     }
     else if (gift.NeedPoint <= 0)
     {
         this.btnChage.Enabled = false;
         this.btnChage.Text = "礼品不允许兑换";
     }
     else
     {
         this.btnChage.Enabled = false;
         this.btnChage.Text = "请登录方能兑换";
         this.litCurrentPoint.Text = string.Format("<a href=\"{0}\">请登录</a>", Globals.ApplicationPath + "/Login.aspx");
     }
 }
Example #7
0
 protected override void AttachChildControls()
 {
     if (this.Page.Request.QueryString["orderId"] == null)
     {
         base.GotoResourceNotFound();
     }
     this.orderId = this.Page.Request.QueryString["orderId"];
     this.litOrderId = (Literal) this.FindControl("litOrderId");
     this.litOrderPrice = (FormatedMoneyLabel) this.FindControl("litOrderPrice");
     this.litPaymentName = (Literal) this.FindControl("litPaymentName");
     this.btnSubMitOrder = ButtonManager.Create(this.FindControl("btnSubMitOrder"));
     this.btnSubMitOrder.Click += new EventHandler(this.btnSubMitOrder_Click);
     if (!this.Page.IsPostBack)
     {
         this.LoadOrderInfo();
     }
 }
Example #8
0
 protected override void AttachChildControls()
 {
     this.litAccountAmount = (FormatedMoneyLabel) this.FindControl("litAccountAmount");
     this.litRequestBalance = (FormatedMoneyLabel) this.FindControl("litRequestBalance");
     this.litUseableBalance = (FormatedMoneyLabel) this.FindControl("litUseableBalance");
     PageTitle.AddSiteNameTitle("预付款账户", HiContext.Current.Context);
     if (!this.Page.IsPostBack)
     {
         Member user = Users.GetUser(HiContext.Current.User.UserId, false) as Member;
         if (!user.IsOpenBalance)
         {
             this.Page.Response.Redirect(Globals.ApplicationPath + string.Format("/user/OpenBalance.aspx?ReturnUrl={0}", HttpContext.Current.Request.Url));
         }
         this.litAccountAmount.Money = user.Balance;
         this.litRequestBalance.Money = user.RequestBalance;
         this.litUseableBalance.Money = user.Balance - user.RequestBalance;
     }
 }
Example #9
0
 protected override void AttachChildControls()
 {
     this.litUserName = (Literal) this.FindControl("litUserName");
     this.rbtnPaymentMode = (RadioButtonList) this.FindControl("rbtnPaymentMode");
     this.txtReChargeBalance = (TextBox) this.FindControl("txtReChargeBalance");
     this.btnReCharge = ButtonManager.Create(this.FindControl("btnReCharge"));
     this.litUseableBalance = (FormatedMoneyLabel) this.FindControl("litUseableBalance");
     PageTitle.AddSiteNameTitle("预付款充值", HiContext.Current.Context);
     this.btnReCharge.Click += new EventHandler(this.btnReCharge_Click);
     if (!this.Page.IsPostBack)
     {
         Member user = Users.GetUser(HiContext.Current.User.UserId, false) as Member;
         if (!user.IsOpenBalance)
         {
             this.Page.Response.Redirect(Globals.ApplicationPath + string.Format("/user/OpenBalance.aspx?ReturnUrl={0}", HttpContext.Current.Request.Url));
         }
         this.BindPaymentMode();
         this.litUserName.Text = HiContext.Current.User.Username;
         this.litUseableBalance.Money = user.Balance - user.RequestBalance;
     }
 }
 protected override void AttachChildControls()
 {
     this.litUserName = (Literal) this.FindControl("litUserName");
     this.lblDrawBanlance = (FormatedMoneyLabel) this.FindControl("lblDrawBanlance");
     this.litBankName = (Literal) this.FindControl("litBankName");
     this.litAccountName = (Literal) this.FindControl("litAccountName");
     this.litMerchantCode = (Literal) this.FindControl("litMerchantCode");
     this.litRemark = (Literal) this.FindControl("litRemark");
     this.btnDrawConfirm = ButtonManager.Create(this.FindControl("btnDrawConfirm"));
     PageTitle.AddSiteNameTitle("确认申请提现", HiContext.Current.Context);
     this.btnDrawConfirm.Click += new EventHandler(this.btnDrawConfirm_Click);
     if (!this.Page.IsPostBack)
     {
         BalanceDrawRequestInfo balanceDrawRequest = this.GetBalanceDrawRequest();
         this.litUserName.Text = HiContext.Current.User.Username;
         this.lblDrawBanlance.Money = balanceDrawRequest.Amount;
         this.litBankName.Text = balanceDrawRequest.BankName;
         this.litAccountName.Text = balanceDrawRequest.AccountName;
         this.litMerchantCode.Text = balanceDrawRequest.MerchantCode;
         this.litRemark.Text = balanceDrawRequest.Remark;
     }
 }
Example #11
0
 protected override void AttachChildControls()
 {
     this.txtSKU = (TextBox) this.FindControl("txtSKU");
     this.btnSKU = (Button) this.FindControl("btnSKU");
     this.btnClearCart = (ImageLinkButton) this.FindControl("btnClearCart");
     this.shoppingCartProductList = (Common_ShoppingCart_ProductList) this.FindControl("Common_ShoppingCart_ProductList");
     this.shoppingCartGiftList = (Common_ShoppingCart_GiftList) this.FindControl("Common_ShoppingCart_GiftList");
     this.lblTotalPrice = (FormatedMoneyLabel) this.FindControl("lblTotalPrice");
     this.lblAmoutPrice = (FormatedMoneyLabel) this.FindControl("lblAmoutPrice");
     this.litlDiscountPrice = (Literal) this.FindControl("litlDiscountPrice");
     this.hlkDiscountName = (HyperLink) this.FindControl("hlkDiscountName");
     this.btnCheckout = (Button) this.FindControl("btnCheckout");
     this.btnShopping = (Button) this.FindControl("btnShopping");
     this.pnlShopCart = (Panel) this.FindControl("pnlShopCart");
     this.litNoProduct = (Literal) this.FindControl("litNoProduct");
     this.hfdIsLogin = (HiddenField) this.FindControl("hfdIsLogin");
     this.btnSKU.Click += new EventHandler(this.btnSKU_Click);
     this.btnClearCart.Click += new EventHandler(this.btnClearCart_Click);
     this.shoppingCartProductList.ItemCommand += new DataListCommandEventHandler(this.shoppingCartProductList_ItemCommand);
     this.shoppingCartGiftList.ItemCommand += new DataListCommandEventHandler(this.shoppingCartGiftList_ItemCommand);
     this.btnCheckout.Click += new EventHandler(this.btnCheckout_Click);
     this.btnShopping.Click += new EventHandler(this.btnShopping_Click);
     if (!HiContext.Current.SiteSettings.IsOpenSiteSale && !HiContext.Current.SiteSettings.IsDistributorSettings)
     {
         this.btnSKU.Visible = false;
         this.btnCheckout.Visible = false;
         this.btnShopping.Visible = false;
     }
     if (!this.Page.IsPostBack)
     {
         this.BindShoppingCart();
     }
     if (!HiContext.Current.User.IsAnonymous)
     {
         this.hfdIsLogin.Value = "logined";
     }
 }
Example #12
0
 protected override void AttachChildControls()
 {
     this.litUserName = (Literal) this.FindControl("litUserName");
     this.lblBanlance = (FormatedMoneyLabel) this.FindControl("lblBanlance");
     this.txtAmount = (TextBox) this.FindControl("txtAmount");
     this.txtBankName = (TextBox) this.FindControl("txtBankName");
     this.txtAccountName = (TextBox) this.FindControl("txtAccountName");
     this.txtMerchantCode = (TextBox) this.FindControl("txtMerchantCode");
     this.txtRemark = (TextBox) this.FindControl("txtRemark");
     this.txtTradePassword = (TextBox) this.FindControl("txtTradePassword");
     this.btnDrawNext = ButtonManager.Create(this.FindControl("btnDrawNext"));
     this.btnDrawNext.Click += new EventHandler(this.btnDrawNext_Click);
     PageTitle.AddSiteNameTitle("申请提现", HiContext.Current.Context);
     if (!this.Page.IsPostBack)
     {
         Member user = Users.GetUser(HiContext.Current.User.UserId, false) as Member;
         if (!user.IsOpenBalance)
         {
             this.Page.Response.Redirect(Globals.ApplicationPath + string.Format("/user/OpenBalance.aspx?ReturnUrl={0}", HttpContext.Current.Request.Url));
         }
         this.litUserName.Text = HiContext.Current.User.Username;
         this.lblBanlance.Money = user.Balance - user.RequestBalance;
     }
 }
Example #13
0
 protected override void AttachChildControls()
 {
     if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId))
     {
         base.GotoResourceNotFound();
     }
     this.common_Location = (Common_Location) this.FindControl("common_Location");
     this.litProductName = (Literal) this.FindControl("litProductName");
     this.lblProductCode = (Literal) this.FindControl("lblProductCode");
     this.lblSku = (SkuLabel) this.FindControl("lblSku");
     this.lblStock = (StockLabel) this.FindControl("lblStock");
     this.litUnit = (Literal) this.FindControl("litUnit");
     this.litWeight = (WeightLabel) this.FindControl("litWeight");
     this.litBrosedNum = (Literal) this.FindControl("litBrosedNum");
     this.litBrand = (Literal) this.FindControl("litBrand");
     this.lblMarkerPrice = (FormatedMoneyLabel) this.FindControl("lblMarkerPrice");
     this.lblBuyPrice = (Label) this.FindControl("lblBuyPrice");
     this.lblTotalPrice = (TotalLabel) this.FindControl("lblTotalPrice");
     this.litDescription = (Literal) this.FindControl("litDescription");
     this.litShortDescription = (Literal) this.FindControl("litShortDescription");
     this.hpkProductConsultations = (HyperLink) this.FindControl("hpkProductConsultations");
     this.hpkProductReviews = (HyperLink) this.FindControl("hpkProductReviews");
     this.images = (Common_ProductImages) this.FindControl("common_ProductImages");
     this.rptExpandAttributes = (ThemedTemplatedRepeater) this.FindControl("rptExpandAttributes");
     this.skuSelector = (SKUSelector) this.FindControl("SKUSelector");
     this.reviews = (Common_ProductReview) this.FindControl("list_Common_ProductReview");
     this.consultations = (Common_ProductConsultations) this.FindControl("list_Common_ProductConsultations");
     this.correlative = (Common_GoodsList_Correlative) this.FindControl("list_Common_GoodsList_Correlative");
     if (!this.Page.IsPostBack)
     {
         int maxNum = 0;
         if (this.reviews != null)
         {
             maxNum = this.reviews.MaxNum;
         }
         int num2 = 0;
         if (this.consultations != null)
         {
             num2 = this.consultations.MaxNum;
         }
         ProductBrowseInfo info = ProductBrowser.GetProductBrowseInfo(this.productId, new int?(maxNum), new int?(num2));
         if ((info.Product == null) || (info.Product.SaleStatus == ProductSaleStatus.Delete))
         {
             this.Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该件商品已经被管理员删除"));
         }
         else if (info.Product.SaleStatus == ProductSaleStatus.OnSale)
         {
             Globals.GetSiteUrls().UrlData.FormatUrl("productdetails", new object[] { this.Page.Request.QueryString["productId"] });
         }
         else
         {
             this.LoadPageSearch(info.Product);
             if (this.hpkProductReviews != null)
             {
                 this.hpkProductReviews.Text = "查看全部" + ProductBrowser.GetProductReviewNumber(this.productId).ToString() + "条评论";
                 this.hpkProductReviews.NavigateUrl = string.Format("LookProductReviews.aspx?productId={0}", this.productId);
             }
             if (this.hpkProductConsultations != null)
             {
                 this.hpkProductConsultations.Text = "查看全部" + ProductBrowser.GetProductConsultationNumber(this.productId).ToString() + "条咨询";
                 this.hpkProductConsultations.NavigateUrl = string.Format("ProductConsultationsAndReplay.aspx?productId={0}", this.productId);
             }
             this.LoadProductInfo(info.Product, info.BrandName);
             BrowsedProductQueue.EnQueue(this.productId);
             this.images.ImageInfo = info.Product;
             if (info.DbAttribute != null)
             {
                 this.rptExpandAttributes.DataSource = info.DbAttribute;
                 this.rptExpandAttributes.DataBind();
             }
             if (info.DbSKUs != null)
             {
                 this.skuSelector.ProductId = this.productId;
                 this.skuSelector.DataSource = info.DbSKUs;
             }
             if ((this.reviews != null) && (info.DBReviews != null))
             {
                 this.reviews.DataSource = info.DBReviews;
                 this.reviews.DataBind();
             }
             if ((this.consultations != null) && (info.DBConsultations != null))
             {
                 this.consultations.DataSource = info.DBConsultations;
                 this.consultations.DataBind();
             }
             if ((this.correlative != null) && (info.DbCorrelatives != null))
             {
                 this.correlative.DataSource = info.DbCorrelatives;
                 this.correlative.DataBind();
             }
         }
     }
 }
Example #14
0
 protected override void AttachChildControls()
 {
     if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId))
     {
         base.GotoResourceNotFound();
     }
     this.common_Location = (Common_Location) this.FindControl("common_Location");
     this.litProductName = (Literal) this.FindControl("litProductName");
     this.lblSku = (SkuLabel) this.FindControl("lblSku");
     this.lblStock = (StockLabel) this.FindControl("lblStock");
     this.litUnit = (Literal) this.FindControl("litUnit");
     this.litWeight = (WeightLabel) this.FindControl("litWeight");
     this.litBrosedNum = (Literal) this.FindControl("litBrosedNum");
     this.litBrand = (Literal) this.FindControl("litBrand");
     this.lblSalePrice = (FormatedMoneyLabel) this.FindControl("lblSalePrice");
     this.lblTotalPrice = (TotalLabel) this.FindControl("lblTotalPrice");
     this.litDescription = (Literal) this.FindControl("litDescription");
     this.litShortDescription = (Literal) this.FindControl("litShortDescription");
     this.btnOrder = (BuyButton) this.FindControl("btnOrder");
     this.hpkProductConsultations = (HyperLink) this.FindControl("hpkProductConsultations");
     this.hpkProductReviews = (HyperLink) this.FindControl("hpkProductReviews");
     this.lblCurrentSalePrice = (FormatedMoneyLabel) this.FindControl("lblCurrentSalePrice");
     this.litCount = (Label) this.FindControl("litCount");
     this.lblNeedPrice = (FormatedMoneyLabel) this.FindControl("lblNeedPrice");
     this.litContent = (Literal) this.FindControl("litContent");
     this.lblEndTime = (FormatedTimeLabel) this.FindControl("lblEndTime");
     this.litRemainTime = (Literal) this.FindControl("litRemainTime");
     this.litNeedCount = (Literal) this.FindControl("litNeedCount");
     this.litMaxCount = (Label) this.FindControl("litMaxCount");
     this.images = (Common_ProductImages) this.FindControl("common_ProductImages");
     this.rptExpandAttributes = (ThemedTemplatedRepeater) this.FindControl("rptExpandAttributes");
     this.skuSelector = (SKUSelector) this.FindControl("SKUSelector");
     this.reviews = (Common_ProductReview) this.FindControl("list_Common_ProductReview");
     this.consultations = (Common_ProductConsultations) this.FindControl("list_Common_ProductConsultations");
     this.correlative = (Common_GoodsList_Correlative) this.FindControl("list_Common_GoodsList_Correlative");
     if (!this.Page.IsPostBack)
     {
         ProductBrowseInfo info = ProductBrowser.GetProductBrowseInfo(this.productId, new int?(this.reviews.MaxNum), new int?(this.consultations.MaxNum));
         GroupBuyInfo productGroupBuyInfo = ProductBrowser.GetProductGroupBuyInfo(this.productId);
         if ((info.Product == null) || (productGroupBuyInfo == null))
         {
             this.Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该件商品参与的团购活动已经结束;或已被管理员删除"));
         }
         else
         {
             this.LoadPageSearch(info.Product);
             this.hpkProductReviews.Text = "查看全部" + ProductBrowser.GetProductReviewNumber(this.productId).ToString() + "条评论";
             this.hpkProductConsultations.Text = "查看全部" + ProductBrowser.GetProductConsultationNumber(this.productId).ToString() + "条咨询";
             this.hpkProductConsultations.NavigateUrl = string.Format("ProductConsultationsAndReplay.aspx?productId={0}", this.productId);
             this.hpkProductReviews.NavigateUrl = string.Format("LookProductReviews.aspx?productId={0}", this.productId);
             this.LoadProductInfo(info.Product, info.BrandName);
             this.LoadProductGroupBuyInfo(productGroupBuyInfo);
             this.btnOrder.Stock = info.Product.Stock;
             BrowsedProductQueue.EnQueue(this.productId);
             this.images.ImageInfo = info.Product;
             if (info.DbAttribute != null)
             {
                 this.rptExpandAttributes.DataSource = info.DbAttribute;
                 this.rptExpandAttributes.DataBind();
             }
             if (info.DbSKUs != null)
             {
                 this.skuSelector.ProductId = this.productId;
                 this.skuSelector.DataSource = info.DbSKUs;
             }
             if (info.DBReviews != null)
             {
                 this.reviews.DataSource = info.DBReviews;
                 this.reviews.DataBind();
             }
             if (info.DBConsultations != null)
             {
                 this.consultations.DataSource = info.DBConsultations;
                 this.consultations.DataBind();
             }
             if (info.DbCorrelatives != null)
             {
                 this.correlative.DataSource = info.DbCorrelatives;
                 this.correlative.DataBind();
             }
         }
     }
 }
Example #15
0
 protected override void AttachChildControls()
 {
     if (string.IsNullOrEmpty(this.Page.Request.QueryString["orderId"]))
     {
         base.GotoResourceNotFound();
     }
     this.orderId = this.Page.Request.QueryString["orderId"];
     this.orderItems = (Common_OrderManage_ReviewsOrderItems) this.FindControl("Common_OrderManage_ReviewsOrderItems");
     this.litWeight = (Literal) this.FindControl("litWeight");
     this.litOrderId = (Literal) this.FindControl("litOrderId");
     this.lbltotalPrice = (FormatedMoneyLabel) this.FindControl("lbltotalPrice");
     this.litAddDate = (FormatedTimeLabel) this.FindControl("litAddDate");
     this.lblOrderStatus = (OrderStatusLabel) this.FindControl("lblOrderStatus");
     this.litCloseReason = (Literal) this.FindControl("litCloseReason");
     this.btnRefer = ButtonManager.Create(this.FindControl("btnRefer"));
     this.btnRefer.Click += new EventHandler(this.btnRefer_Click);
     if (!this.Page.IsPostBack && ((HiContext.Current.User.UserRole == UserRole.Member) || (HiContext.Current.User.UserRole == UserRole.Underling)))
     {
         this.btnRefer.Text = "提交评论";
         OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId);
         this.BindOrderItems(orderInfo);
         this.BindOrderBase(orderInfo);
     }
 }
 protected override void AttachChildControls()
 {
     this.lbltotalcommission = (FormatedMoneyLabel) this.FindControl("lbltotalcommission");
     this.lblsurpluscommission = (FormatedMoneyLabel) this.FindControl("lblsurpluscommission");
     this.lblcommission = (FormatedMoneyLabel) this.FindControl("lblcommission");
     this.lbltwocommission = (FormatedMoneyLabel) this.FindControl("lbltwocommission");
     this.lblthreecommission = (FormatedMoneyLabel) this.FindControl("lblthreecommission");
     this.lblsaleprice = (FormatedMoneyLabel) this.FindControl("lblsaleprice");
     this.lbltwosaleprice = (FormatedMoneyLabel) this.FindControl("lbltwosaleprice");
     this.lblthreesaleprice = (FormatedMoneyLabel) this.FindControl("lblthreesaleprice");
     this.paneltwo = (Panel) this.FindControl("paneltwo");
     this.panelthree = (Panel) this.FindControl("panelthree");
     this.litMsg = (Literal) this.FindControl("litMsg");
     this.hyrequest = (HyperLink) this.FindControl("hyrequest");
     DistributorsInfo userIdDistributors = DistributorsBrower.GetUserIdDistributors(Globals.GetCurrentMemberUserId());
     DataTable currentDistributorsCommosion = DistributorsBrower.GetCurrentDistributorsCommosion(userIdDistributors.UserId);
     if ((userIdDistributors != null) && (userIdDistributors.UserId > 0))
     {
         this.lblsurpluscommission.Money = userIdDistributors.ReferralBlance;
         if (userIdDistributors.DistributorGradeId == DistributorGrade.TowDistributor)
         {
             this.paneltwo.Visible = false;
         }
         else if (userIdDistributors.DistributorGradeId == DistributorGrade.ThreeDistributor)
         {
             this.paneltwo.Visible = false;
             this.panelthree.Visible = false;
         }
         if ((currentDistributorsCommosion != null) && (currentDistributorsCommosion.Rows.Count > 0))
         {
             this.lblcommission.Money = currentDistributorsCommosion.Rows[0]["CommTotal"];
             this.lblsaleprice.Money = currentDistributorsCommosion.Rows[0]["OrderTotal"];
         }
         if (userIdDistributors.DistributorGradeId == DistributorGrade.OneDistributor)
         {
             currentDistributorsCommosion = DistributorsBrower.GetDistributorsCommosion(userIdDistributors.UserId, DistributorGrade.TowDistributor);
             if ((currentDistributorsCommosion != null) && (currentDistributorsCommosion.Rows.Count > 0))
             {
                 this.lbltwocommission.Money = currentDistributorsCommosion.Rows[0]["CommTotal"];
                 this.lbltwosaleprice.Money = currentDistributorsCommosion.Rows[0]["OrderTotal"];
             }
             currentDistributorsCommosion = DistributorsBrower.GetDistributorsCommosion(userIdDistributors.UserId, DistributorGrade.ThreeDistributor);
             if ((currentDistributorsCommosion != null) && (currentDistributorsCommosion.Rows.Count > 0))
             {
                 this.lblthreecommission.Money = currentDistributorsCommosion.Rows[0]["CommTotal"];
                 this.lblthreesaleprice.Money = currentDistributorsCommosion.Rows[0]["OrderTotal"];
             }
         }
         if (userIdDistributors.DistributorGradeId == DistributorGrade.TowDistributor)
         {
             currentDistributorsCommosion = DistributorsBrower.GetDistributorsCommosion(userIdDistributors.UserId, DistributorGrade.ThreeDistributor);
             if ((currentDistributorsCommosion != null) && (currentDistributorsCommosion.Rows.Count > 0))
             {
                 this.lblthreecommission.Money = currentDistributorsCommosion.Rows[0]["CommTotal"];
                 this.lblthreesaleprice.Money = currentDistributorsCommosion.Rows[0]["OrderTotal"];
             }
         }
         this.lbltotalcommission.Money = userIdDistributors.ReferralBlance + userIdDistributors.ReferralRequestBalance;
         if (DistributorsBrower.IsExitsCommionsRequest())
         {
             this.litMsg.Text = "您的申请正在审核当中……";
             this.hyrequest.Enabled = false;
         }
         MemberInfo currentMember = MemberProcessor.GetCurrentMember();
         if (string.IsNullOrEmpty(currentMember.RealName) || string.IsNullOrEmpty(currentMember.CellPhone))
         {
             this.hyrequest.NavigateUrl = "UserInfo.aspx?edit=true&&returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString());
         }
     }
 }
Example #17
0
 protected override void AttachChildControls()
 {
     this.orderId = this.Page.Request.QueryString["orderId"];
     this.litOrderId = (Literal) this.FindControl("litOrderId");
     this.lbltotalPrice = (FormatedMoneyLabel) this.FindControl("lbltotalPrice");
     this.litAddDate = (FormatedTimeLabel) this.FindControl("litAddDate");
     this.lblOrderStatus = (OrderStatusLabel) this.FindControl("lblOrderStatus");
     this.litCloseReason = (Literal) this.FindControl("litCloseReason");
     this.litRemark = (Literal) this.FindControl("litRemark");
     this.litShipTo = (Literal) this.FindControl("litShipTo");
     this.litRegion = (Literal) this.FindControl("litRegion");
     this.litAddress = (Literal) this.FindControl("litAddress");
     this.litZipcode = (Literal) this.FindControl("litZipcode");
     this.litEmail = (Literal) this.FindControl("litEmail");
     this.litPhone = (Literal) this.FindControl("litPhone");
     this.litTellPhone = (Literal) this.FindControl("litTellPhone");
     this.litUserName = (Literal) this.FindControl("litUserName");
     this.litUserAddress = (Literal) this.FindControl("litUserAddress");
     this.litUserEmail = (Literal) this.FindControl("litUserEmail");
     this.litUserPhone = (Literal) this.FindControl("litUserPhone");
     this.litUserTellPhone = (Literal) this.FindControl("litUserTellPhone");
     this.litUserQQ = (Literal) this.FindControl("litUserQQ");
     this.litUserMSN = (Literal) this.FindControl("litUserMSN");
     this.litPaymentType = (Literal) this.FindControl("litPaymentType");
     this.litModeName = (Literal) this.FindControl("litModeName");
     this.plOrderOption = (Panel) this.FindControl("plOrderOption");
     this.grdOrderOption = (GridView) this.FindControl("grdOrderOption");
     this.plOrderSended = (Panel) this.FindControl("plOrderSended");
     this.litRealModeName = (Literal) this.FindControl("litRealModeName");
     this.litShippNumber = (Literal) this.FindControl("litShippNumber");
     this.litDiscountName = (HyperLink) this.FindControl("litDiscountName");
     this.lblAdjustedDiscount = (FormatedMoneyLabel) this.FindControl("lblAdjustedDiscount");
     this.litFreeName = (HyperLink) this.FindControl("litFreeName");
     this.plExpress = (Panel) this.FindControl("plExpress");
     this.power = (HtmlAnchor) this.FindControl("power");
     this.orderItems = (Common_OrderManage_OrderItems) this.FindControl("Common_OrderManage_OrderItems");
     this.grdOrderGift = (GridView) this.FindControl("grdOrderGift");
     this.plOrderGift = (Panel) this.FindControl("plOrderGift");
     this.lblCartMoney = (FormatedMoneyLabel) this.FindControl("lblCartMoney");
     this.litPoints = (Literal) this.FindControl("litPoints");
     this.litWeight = (Literal) this.FindControl("litWeight");
     this.litFree = (Literal) this.FindControl("litFree");
     this.lblFreight = (FormatedMoneyLabel) this.FindControl("lblFreight");
     this.lblPayCharge = (FormatedMoneyLabel) this.FindControl("lblPayCharge");
     this.lblOptionPrice = (FormatedMoneyLabel) this.FindControl("lblOptionPrice");
     this.litCouponValue = (Literal) this.FindControl("litCouponValue");
     this.lblDiscount = (FormatedMoneyLabel) this.FindControl("lblDiscount");
     this.litTotalPrice = (FormatedMoneyLabel) this.FindControl("litTotalPrice");
     this.plRefund = (Panel) this.FindControl("plRefund");
     this.lblTotalBalance = (FormatedMoneyLabel) this.FindControl("lblTotalBalance");
     this.litRefundOrderRemark = (Literal) this.FindControl("litRefundOrderRemark");
     PageTitle.AddTitle("订单详细页", HiContext.Current.Context);
     if (!this.Page.IsPostBack)
     {
         OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId);
         this.BindOrderBase(orderInfo);
         this.BindOrderAddress(orderInfo);
         this.BindOrderItems(orderInfo);
         this.BindOrderRefund(orderInfo);
     }
 }
Example #18
0
 protected override void AttachChildControls()
 {
     if (!int.TryParse(Page.Request.QueryString["productId"], out productId))
     {
         base.GotoResourceNotFound();
     }
     common_Location = (Common_Location)FindControl("common_Location");
     litProductName = (Literal)FindControl("litProductName");
     lblProductCode = (Literal)FindControl("lblProductCode");
     lblSku = (SkuLabel)FindControl("lblSku");
     lblStock = (StockLabel)FindControl("lblStock");
     litUnit = (Literal)FindControl("litUnit");
     litWeight = (WeightLabel)FindControl("litWeight");
     litBrosedNum = (Literal)FindControl("litBrosedNum");
     litBrand = (Literal)FindControl("litBrand");
     litSaleCounts = (Literal)FindControl("litSaleCounts");
     lblMarkerPrice = (FormatedMoneyLabel)FindControl("lblMarkerPrice");
     lblBuyPrice = (Label)FindControl("lblBuyPrice");
     lblTotalPrice = (TotalLabel)FindControl("lblTotalPrice");
     litDescription = (Literal)FindControl("litDescription");
     litShortDescription = (Literal)FindControl("litShortDescription");
     btnBuy = (BuyButton)FindControl("btnBuy");
     btnaddgouwu = (AddCartButton)FindControl("btnaddgouwu");
     hpkProductConsultations = (HyperLink)FindControl("hpkProductConsultations");
     hpkProductReviews = (HyperLink)FindControl("hpkProductReviews");
     images = (Common_ProductImages)FindControl("common_ProductImages");
     rptExpandAttributes = (ThemedTemplatedRepeater)FindControl("rptExpandAttributes");
     skuSelector = (SKUSelector)FindControl("SKUSelector");
     reviews = (Common_ProductReview)FindControl("list_Common_ProductReview");
     consultations = (Common_ProductConsultations)FindControl("list_Common_ProductConsultations");
     correlative = (Common_GoodsList_Correlative)FindControl("list_Common_GoodsList_Correlative");
     if (!Page.IsPostBack)
     {
         ProductBrowseInfo info = ProductBrowser.GetProductBrowseInfo(productId, new int?(reviews.MaxNum), new int?(consultations.MaxNum));
         if ((info.Product == null) || (info.Product.SaleStatus == ProductSaleStatus.Delete))
         {
             Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该件商品已经被管理员删除"));
         }
         else
         {
             if (info.Product.SaleStatus == ProductSaleStatus.UnSale)
             {
                 Page.Response.Redirect(Globals.GetSiteUrls().UrlData.FormatUrl("unproductdetails", new object[] { Page.Request.QueryString["productId"] }));
             }
             LoadPageSearch(info.Product);
             hpkProductReviews.Text = "查看全部" + ProductBrowser.GetProductReviewNumber(productId).ToString() + "条评论";
             hpkProductConsultations.Text = "查看全部" + ProductBrowser.GetProductConsultationNumber(productId).ToString() + "条咨询";
             hpkProductConsultations.NavigateUrl = string.Format("ProductConsultationsAndReplay.aspx?productId={0}", productId);
             hpkProductReviews.NavigateUrl = string.Format("LookProductReviews.aspx?productId={0}", productId);
             LoadProductInfo(info.Product, info.BrandName);
             btnBuy.Stock = info.Product.Stock;
             btnaddgouwu.Stock = info.Product.Stock;
             BrowsedProductQueue.EnQueue(productId);
             images.ImageInfo = info.Product;
             if (info.DbAttribute != null)
             {
                 rptExpandAttributes.DataSource = info.DbAttribute;
                 rptExpandAttributes.DataBind();
             }
             if (info.DbSKUs != null)
             {
                 skuSelector.ProductId = productId;
                 skuSelector.DataSource = info.DbSKUs;
             }
             if (info.DBReviews != null)
             {
                 reviews.DataSource = info.DBReviews;
                 reviews.DataBind();
             }
             if (info.DBConsultations != null)
             {
                 consultations.DataSource = info.DBConsultations;
                 consultations.DataBind();
             }
             if (info.DbCorrelatives != null)
             {
                 correlative.DataSource = info.DbCorrelatives;
                 correlative.DataBind();
             }
         }
     }
 }