Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        System.Xml.Linq.XElement xeResources = null;
        commonCulture.appData.getLocalResource(out xeResources);
        customConfig.OperatorSettings opSettings = new customConfig.OperatorSettings("W88");
        string strLPNumber = string.Empty;
        string strAppKey   = string.Empty;
        string strSkill    = string.Empty;

        System.Web.UI.WebControls.Literal litScript = (System.Web.UI.WebControls.Literal)Page.FindControl("litScript");

        if (!Page.IsPostBack)
        {
            System.Text.StringBuilder sbJSDictionary = new System.Text.StringBuilder();
            foreach (System.Xml.Linq.XElement xeLabel in xeResources.Elements())
            {
                sbJSDictionary.Append("dictionary.setData('" + xeLabel.Name + "', '" + xeLabel.Value + "');");
            }

            strLPNumber = opSettings.Values.Get("LPNumber");
            strAppKey   = opSettings.Values.Get("LPAppKey");
            strSkill    = commonCulture.ElementValues.getResourceString("lblSkill", xeResources);

            btnSend.InnerText    = commonCulture.ElementValues.getResourceString("btnSend", xeResources);
            btnReqChat.InnerText = commonCulture.ElementValues.getResourceString("btnReqChat", xeResources);
            btnEndChat.InnerText = commonCulture.ElementValues.getResourceString("btnEndChat", xeResources);
            //LPVariables.SessionId = '" + System.Guid.NewGuid().ToString().ToUpper() + "';
            if (litScript != null)
            {
                litScript.Text += "<script type='text/javascript'> $(function () { LPVariables.LPNumber = '" + strLPNumber + "'; LPVariables.AppKey = '" + commonEncryption.decrypting(strAppKey) + "'; LPVariables.Skill = '" + strSkill + "'; LPVariables.VisitorName = '" + base.userInfo.MemberCode + "'; LPVariables.SessionId = '" + System.Guid.NewGuid().ToString().ToUpper() + "'; " + Convert.ToString(sbJSDictionary) + " });</script>";
            }
        }
    }
Пример #2
0
 /// <summary>
 /// Toggles X-UA metatag if website is in edit mode
 /// </summary>
 public void ForceIE7InEditMode(Literal lit)
 {
     if (HttpContext.Current.Request.QueryString["cmspagemode"] == "edit")
     {
         lit.Text = "<meta http-equiv='X-UA-Compatible' content='IE=7' />";
     }
 }
Пример #3
0
        protected override void AttachChildControls()
        {
            this.litAmount      = (FormatedMoneyLabel)this.FindControl("litAmount");
            this.litRequestDate = (System.Web.UI.WebControls.Literal) this.FindControl("litRequestDate");
            this.litAccount     = (System.Web.UI.WebControls.Literal) this.FindControl("litAccount");
            this.litAccountDate = (System.Web.UI.WebControls.Literal) this.FindControl("litAccountDate");
            this.litStatus      = (System.Web.UI.WebControls.Literal) this.FindControl("litStatus");
            this.litMark        = (System.Web.UI.WebControls.Literal) this.FindControl("litMark");
            PageTitle.AddSiteNameTitle("提现详情");
            long journalNumber = 0L;

            if (!string.IsNullOrEmpty(this.Page.Request.QueryString["id"]))
            {
                long.TryParse(this.Page.Request.QueryString["id"], out journalNumber);
            }
            SplittinDrawInfo splittinDraw = MemberProcessor.GetSplittinDraw(journalNumber);

            if (splittinDraw == null)
            {
                this.ShowMessage("错误的提现记录ID", false);
            }
            this.litAmount.Money     = splittinDraw.Amount;
            this.litRequestDate.Text = splittinDraw.RequestDate.ToString("yyyy-MM-dd hh:mm:ss");
            this.litMark.Text        = splittinDraw.ManagerRemark;
            this.litAccount.Text     = splittinDraw.Account;
            if (splittinDraw.AuditStatus != 1 && splittinDraw.AccountDate.HasValue)
            {
                this.litAccountDate.Text = splittinDraw.AccountDate.Value.ToString("yyyy-MM-dd hh:mm:ss");
            }
            this.litStatus.Text = ((splittinDraw.AuditStatus == 1) ? "未审核" : "已审核");
        }
Пример #4
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");
 }
Пример #5
0
        /// <summary>
        /// 分页
        /// </summary>
        public static PagedDataSource Fy(PagedDataSource pds, int _pagesize, int _pagenum, string herf, Literal l1, Literal l2, Literal l3, Literal l4, Literal l5, Literal l6, Literal l7, Literal l8, Literal l9, Literal l10)
        {
            pds.AllowPaging = true;
            pds.PageSize = _pagesize;
            pds.CurrentPageIndex = _pagenum;
            string leftstyle = " width:18px; height:18px; display: inline-block; vertical-align:middle; background: url('/image/fen1.jpg');";
            string left = "<a href=\"{0}\" style=\"{1}\"></a>";
            string rightstyle = " width:18px; height:18px; display: inline-block; vertical-align:middle; background: url('/image/fen2.jpg');";
            string right = "<a href=\"{0}\" style=\"{1}\"></a>";
            string mid = "<a href='{0}' class='{1}'>[{2}]</a>";
            string midclass = "dl1";

            //共多少条/页
            if (pds.PageCount != 1)
            {
                //页数
                l1.Text = "共" + pds.DataSourceCount + "条 当前" + (pds.CurrentPageIndex + 1) + "/" + pds.PageCount + "页&nbsp;&nbsp;&nbsp;&nbsp;";

                if (pds.IsLastPage)
                {
                    l2.Text = String.Format(left, String.Format(herf, (pds.PageCount - 2).ToString()), leftstyle) + "&nbsp;&nbsp;";
                    l3.Text = pds.PageCount - 4 > 0 ? String.Format(mid, String.Format(herf, (pds.PageCount - 5).ToString()), midclass, (pds.PageCount - 4).ToString()) : "";
                    l4.Text = pds.PageCount - 3 > 0 ? String.Format(mid, String.Format(herf, (pds.PageCount - 4).ToString()), midclass, (pds.PageCount - 3).ToString()) : "";
                    l5.Text = pds.PageCount - 2 > 0 ? String.Format(mid, String.Format(herf, (pds.PageCount - 3).ToString()), midclass, (pds.PageCount - 2).ToString()) : "";
                    l6.Text = pds.PageCount - 1 > 0 ? String.Format(mid, String.Format(herf, (pds.PageCount - 2).ToString()), midclass, (pds.PageCount - 1).ToString()) : "";
                    l7.Text = pds.PageCount.ToString();
                    l8.Text = "";
                    l9.Text = "";
                    l10.Text = "";
                }

                if (pds.IsFirstPage)
                {
                    l2.Text = "";
                    l3.Text = "1";
                    l4.Text = pds.CurrentPageIndex + 2 <= pds.PageCount ? String.Format(mid, String.Format(herf, (pds.CurrentPageIndex + 1).ToString()), midclass, (pds.CurrentPageIndex + 2).ToString()) : "";
                    l5.Text = pds.CurrentPageIndex + 3 <= pds.PageCount ? String.Format(mid, String.Format(herf, (pds.CurrentPageIndex + 2).ToString()), midclass, (pds.CurrentPageIndex + 3).ToString()) : "";
                    l6.Text = pds.CurrentPageIndex + 4 <= pds.PageCount ? String.Format(mid, String.Format(herf, (pds.CurrentPageIndex + 3).ToString()), midclass, (pds.CurrentPageIndex + 4).ToString()) : "";
                    l7.Text = pds.CurrentPageIndex + 5 <= pds.PageCount ? String.Format(mid, String.Format(herf, (pds.CurrentPageIndex + 4).ToString()), midclass, (pds.CurrentPageIndex + 5).ToString()) : "";
                    l8.Text = pds.CurrentPageIndex + 2 <= pds.PageCount ? "&nbsp;&nbsp;" + String.Format(right, String.Format(herf, (pds.CurrentPageIndex + 1).ToString()), rightstyle) : "";
                    l9.Text = "";
                    l10.Text = "";
                }

                if ((!pds.IsFirstPage) && (!pds.IsLastPage))
                {
                    l2.Text = String.Format(left, String.Format(herf, (pds.CurrentPageIndex - 1).ToString()), leftstyle) + "&nbsp;&nbsp;"; ;
                    l3.Text = (pds.CurrentPageIndex - 2 > 0) ? String.Format(mid, String.Format(herf, (pds.CurrentPageIndex - 3).ToString()), midclass, (pds.CurrentPageIndex - 2).ToString()) : "";
                    l4.Text = (pds.CurrentPageIndex - 1 > 0) ? String.Format(mid, String.Format(herf, (pds.CurrentPageIndex - 2).ToString()), midclass, (pds.CurrentPageIndex - 1).ToString()) : "";
                    l5.Text = pds.CurrentPageIndex > 0 ? String.Format(mid, String.Format(herf, (pds.CurrentPageIndex - 1).ToString()), midclass, (pds.CurrentPageIndex).ToString()) : "";
                    l6.Text = (pds.CurrentPageIndex + 1).ToString();
                    l7.Text = pds.CurrentPageIndex + 1 < pds.PageCount ? String.Format(mid, String.Format(herf, (pds.CurrentPageIndex + 1).ToString()), midclass, (pds.CurrentPageIndex + 2).ToString()) : "";
                    l8.Text = (pds.CurrentPageIndex + 2 < pds.PageCount) ? String.Format(mid, String.Format(herf, (pds.CurrentPageIndex + 2).ToString()), midclass, (pds.CurrentPageIndex + 3).ToString()) : "";
                    l9.Text = (pds.CurrentPageIndex + 3 < pds.PageCount) ? String.Format(mid, String.Format(herf, (pds.CurrentPageIndex + 3).ToString()), midclass, (pds.CurrentPageIndex + 4).ToString()) : "";
                    l10.Text = "&nbsp;&nbsp;" + String.Format(right, String.Format(herf, (pds.CurrentPageIndex + 1).ToString()), rightstyle);

                }
            }
            return pds;
        }
Пример #6
0
        private void changeCoupons_ItemCommand(object sender, System.Web.UI.WebControls.DataListCommandEventArgs e)
        {
            int couponId = (int)this.changeCoupons.DataKeys[e.Item.ItemIndex];

            if (e.CommandName == "Change")
            {
                System.Web.UI.WebControls.Literal literal = (System.Web.UI.WebControls.Literal)e.Item.FindControl("litNeedPoint");
                int    num    = int.Parse(literal.Text);
                Member member = Users.GetUser(HiContext.Current.User.UserId, false) as Member;
                if (num > member.Points)
                {
                    this.ShowMessage("当前积分不够兑换此优惠券", false);
                }
                else
                {
                    if (TradeHelper.PointChageCoupon(couponId, num, member.Points))
                    {
                        this.ShowMessage("兑换成功,请查看您的优惠券", true);
                    }
                    else
                    {
                        this.ShowMessage("兑换失败", false);
                    }
                }
            }
        }
Пример #7
0
 protected override void AttachChildControls()
 {
     PageTitle.AddSiteNameTitle("申请提现");
     this.lblBanlance     = (System.Web.UI.WebControls.Literal) this.FindControl("lblBanlance");
     this.lblLastDrawTime = (System.Web.UI.WebControls.Literal) this.FindControl("lblLastDrawTime");
     if (!this.Page.IsPostBack)
     {
         if (this.lblBanlance != null)
         {
             this.lblBanlance.Text = MemberProcessor.GetUserUseSplittin(HiContext.Current.User.UserId).ToString("F2");
         }
         if (this.lblLastDrawTime != null)
         {
             DbQueryResult mySplittinDraws = MemberProcessor.GetMySplittinDraws(new BalanceDrawRequestQuery
             {
                 PageIndex = 1,
                 PageSize  = 1,
                 UserId    = new int?(HiContext.Current.User.UserId)
             }, new int?(1));
             if (mySplittinDraws.TotalRecords > 0)
             {
                 DataTable dataTable = (DataTable)mySplittinDraws.Data;
                 this.lblLastDrawTime.Text = dataTable.Rows[0]["RequestDate"].ToString();
                 return;
             }
             this.lblLastDrawTime.Text = "您还没有提现记录";
         }
     }
 }
Пример #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Post == null)
                return;

            PageBase page = (PageBase)Page;
            PostPanel.CssClass = this.CssClass;
            ReplyInfo reply = (ReplyInfo)Post;
            msgBody.Text = reply.Message.ReplaceNoParseTags().ParseVideoTags().ParseWebUrls();
            litDate.Text = SnitzTime.TimeAgoTag(reply.Date, page.IsAuthenticated, page.Member);
            litAuthor.Text = reply.AuthorProfilePopup;
            ProfileCommon prof = ProfileCommon.GetUserProfile(reply.AuthorName);
            var author = Members.GetAuthor(reply.AuthorId);
            if (prof.Gravatar)
            {
                Gravatar avatar = new Gravatar { Email = author.Email };
                if (author.AvatarUrl != "" && author.AvatarUrl.StartsWith("http:"))
                    avatar.DefaultImage = author.AvatarUrl;
                avatar.CssClass = "avatar";
                phAvatar.Controls.Add(avatar);

            }
            else
            {

                SnitzMembershipUser mu = (SnitzMembershipUser)Membership.GetUser(author.Username);
                Literal avatar = new Literal { Text = author.AvatarImg };
                if (mu != null && mu.IsActive && !(Config.AnonMembers.Contains(mu.UserName)))
                    avatar.Text = avatar.Text.Replace("'avatar'", "'avatar online'");
                phAvatar.Controls.Add(avatar);
            }
        }
 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.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.litCustomsClearanceFee = (FormatedMoneyLabel)this.FindControl("litCustomsClearanceFee");
     this.litExpressFee          = (FormatedMoneyLabel)this.FindControl("litExpressFee");
     this.litFeeAffiliation      = (System.Web.UI.WebControls.Literal) this.FindControl("litFeeAffiliation");
     this.litLogisticsCompany    = (System.Web.UI.WebControls.Literal) this.FindControl("litLogisticsCompany");
     this.litLogisticsId         = (System.Web.UI.WebControls.Literal) this.FindControl("litLogisticsId");
     if (!this.Page.IsPostBack)
     {
         this.BindReturnsTable(this.returnsId);
         OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId);
         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(orderInfo);
     }
 }
Пример #10
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();
            }
        }
Пример #11
0
        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("品牌详情");
        }
Пример #12
0
        public Literal navbar()
        {
            Literal nav = new Literal();

            nav.Text =

                        "<div class='cabecera'>"
                + "<img id='FondoCab'  style='width:100%; position:absolute; max-height:90'>" + "<a><img src='imagenes/logo uni.png' id='loguito'></a>"
                + "<a><label id='TituloSis' >Portal Practicas</label></a>"
                + "<ul id='referencias'>"
                + "<li><a href='#'>Inicio</a></li>"
                + "<li><a href='#'>Salida</a></li>"
                + "</ul>"

                + "</div>"
            +"<div>"
                +"<nav class='cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left' id='cbp-spmenu-s1'>"
                    + "<h3><a href='#'>Menu</a></h3>"
                    + "<a href='AltaAlumnos.apsx'>Alta Alumnos</a>"
                    + "<a href='AltaArchivo.aspx'>Alta Archivos</a>"
                    + "<a href='#'>Alta Responsable</a>"
                    + "<a href='#'>Consulta Alumnos</a>"
                    + "</nav>"
                    +"</div>";

            return nav;
        }
Пример #13
0
        protected override void AttachChildControls()
        {
            if (!int.TryParse(this.Page.Request.QueryString["TopicId"], out this.topicId))
            {
                base.GotoResourceNotFound("");
            }
            if (HiContext.Current.User.UserRole == UserRole.Member && ((Member)HiContext.Current.User).ReferralStatus == 2 && string.IsNullOrEmpty(this.Page.Request.QueryString["ReferralUserId"]))
            {
                string text = System.Web.HttpContext.Current.Request.Url.ToString();
                if (text.IndexOf("?") > -1)
                {
                    text = text + "&ReferralUserId=" + HiContext.Current.User.UserId;
                }
                else
                {
                    text = text + "?ReferralUserId=" + HiContext.Current.User.UserId;
                }
                this.Page.Response.Redirect(text);
                return;
            }
            this.imgUrl     = (HiImage)this.FindControl("imgUrl");
            this.litContent = (System.Web.UI.WebControls.Literal) this.FindControl("litContent");
            TopicInfo topic = VshopBrowser.GetTopic(this.topicId);

            if (topic == null)
            {
                base.GotoResourceNotFound("");
            }

            //主题大图和标题
            this.imgUrl.ImageUrl = topic.IconUrl;
            this.litContent.Text = topic.Content;
            PageTitle.AddSiteNameTitle(topic.Content);
        }
Пример #14
0
        public void LoadControl()
        {
            if (this.purchaseOrder.PurchaseStatus == OrderStatus.WaitBuyerPay || this.purchaseOrder.PurchaseStatus == OrderStatus.BuyerAlreadyPaid)
            {
                this.lkBtnEditshipingMode.Visible = true;
            }
            if (this.purchaseOrder.PurchaseStatus != OrderStatus.Finished)
            {
                if (this.purchaseOrder.PurchaseStatus != OrderStatus.SellerAlreadySent)
                {
                    this.lblModeName.Text = this.purchaseOrder.ModeName;
                    goto IL_74;
                }
            }
            this.lblModeName.Text = this.purchaseOrder.RealModeName;
IL_74:
            this.litFreight.Text    = Globals.FormatMoney(this.purchaseOrder.AdjustedFreight);
            this.litDiscount.Text   = Globals.FormatMoney(this.purchaseOrder.AdjustedDiscount);
            this.litTotalPrice.Text = Globals.FormatMoney(this.purchaseOrder.GetPurchaseTotal());
            if (this.purchaseOrder.Tax > 0m)
            {
                this.litTax.Text = "<tr class=\"bg\"><td align=\"right\">税金(元):</td><td colspan=\"2\"><span class='Name'>" + Globals.FormatMoney(this.purchaseOrder.Tax);
                System.Web.UI.WebControls.Literal expr_108 = this.litTax;
                expr_108.Text += "</span></td></tr>";
            }
            if (!string.IsNullOrEmpty(this.purchaseOrder.InvoiceTitle))
            {
                this.litInvoiceTitle.Text = "<tr class=\"bg\"><td align=\"right\">发票抬头:</td><td colspan=\"2\"><span class='Name'>" + this.purchaseOrder.InvoiceTitle;
                System.Web.UI.WebControls.Literal expr_155 = this.litInvoiceTitle;
                expr_155.Text += "</span></td></tr>";
            }
        }
Пример #15
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("中奖记录");
        }
Пример #16
0
        override protected void OnInit(EventArgs e)
        {
            base.OnInit(e);

            try
            {


                #region "load templates"

                var t1 = "tools.html";

                // Get Display Body
                var dataTempl = ModCtrl.GetTemplateData(ModSettings, t1, Utils.GetCurrentCulture(), DebugMode);
                // insert page header text
                rpData.ItemTemplate = NBrightBuyUtils.GetGenXmlTemplate(dataTempl, ModSettings.Settings(), PortalSettings.HomeDirectory);

            }
            catch (Exception exc)
            {
                //display the error on the template (don;t want to log it here, prefer to deal with errors directly.)
                var l = new Literal();
                l.Text = exc.ToString();
                phData.Controls.Add(l);
            }

        }
Пример #17
0
 protected override void AttachChildControls()
 {
     this.txtShipTo = (TextBox) this.FindControl("txtShipTo");
     this.txtAddress = (TextBox) this.FindControl("txtAddress");
     this.txtZipcode = (TextBox) this.FindControl("txtZipcode");
     this.txtTelPhone = (TextBox) this.FindControl("txtTelPhone");
     this.txtCellPhone = (TextBox) this.FindControl("txtCellPhone");
     this.dropRegionsSelect = (RegionSelector) this.FindControl("dropRegions");
     this.btnAddAddress = ButtonManager.Create(this.FindControl("btnAddAddress"));
     this.btnCancel = ButtonManager.Create(this.FindControl("btnCancel"));
     this.btnEditAddress = ButtonManager.Create(this.FindControl("btnEditAddress"));
     this.dtlstRegionsSelect = (Common_Address_AddressList) this.FindControl("list_Common_Consignee_ConsigneeList");
     this.lblAddressCount = (Literal) this.FindControl("lblAddressCount");
     this.btnAddAddress.Click += new EventHandler(this.btnAddAddress_Click);
     this.btnEditAddress.Click += new EventHandler(this.btnEditAddress_Click);
     this.btnCancel.Click += new EventHandler(this.btnCancel_Click);
     this.dtlstRegionsSelect.ItemCommand += new Common_Address_AddressList.CommandEventHandler(this.dtlstRegionsSelect_ItemCommand);
     PageTitle.AddSiteNameTitle("我的收货地址", HiContext.Current.Context);
     if (!this.Page.IsPostBack)
     {
         this.lblAddressCount.Text = HiContext.Current.Config.ShippingAddressQuantity.ToString();
         this.dropRegionsSelect.DataBind();
         this.Reset();
         this.btnEditAddress.Visible = false;
         this.BindList();
     }
 }
Пример #18
0
        protected override void AttachChildControls()
        {
            this.litReferralRegisterresults = (System.Web.UI.WebControls.Literal) this.FindControl("litReferralRegisterresults");
            this.litRefuseReasons           = (System.Web.UI.WebControls.Literal) this.FindControl("litRefuseReasons");
            this.divRefuseReasons           = (System.Web.UI.HtmlControls.HtmlGenericControl) this.FindControl("divRefuseReasons");
            PageTitle.AddSiteNameTitle("我要成为推广员");
            Member member = Users.GetUser(HiContext.Current.User.UserId, false) as Member;

            if (member.ReferralStatus == 2)
            {
                this.Page.Response.Redirect(Globals.ApplicationPath + "/Vshop/Referral.aspx");
                return;
            }
            if (member.ReferralStatus == 1)
            {
                this.litReferralRegisterresults.Text = "您提交的申请正在审核中...";
                if (this.divRefuseReasons != null)
                {
                    this.divRefuseReasons.Visible = false;
                    return;
                }
            }
            else
            {
                if (member.ReferralStatus == 3)
                {
                    this.litReferralRegisterresults.Text = "您提交的申请被拒绝了...";
                    this.litRefuseReasons.Text           = "拒绝理由:" + member.RefusalReason;
                }
            }
        }
Пример #19
0
        protected override void CreateChildControls()
        {
            Controls.Clear();

            Control articleMarkup = Page.LoadControl("~/Design/Article.ascx");

            _headerPlaceholder = articleMarkup.FindControl("HeaderPlaceholder") as PlaceHolder;
            _contentPlaceholder = articleMarkup.FindControl("ContentPlaceholder") as PlaceHolder;

            _headerPlaceholder.Visible = ! String.IsNullOrEmpty(_caption);

            if (_headerPlaceholder.Visible)
            {
                Literal caption = new Literal();
                caption.Text = _caption;
                _headerPlaceholder.Controls.Add(caption);
            }

            if (_contentTemplate != null)
            {
                TemplateContainer container = new TemplateContainer();
                _contentTemplate.InstantiateIn(container);
                _contentPlaceholder.Controls.Add(container);
            }

            Controls.Add(articleMarkup);
        }
Пример #20
0
 private void RazorPageLoad()
 {
     var strOut = NBrightBuyUtils.RazorTemplRender("discountcodes.cshtml", 0, "", null, ControlPath, "config", Utils.GetCurrentCulture(), StoreSettings.Current.Settings());
     var lit = new Literal();
     lit.Text = strOut;
     phData.Controls.Add(lit);
 }
Пример #21
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       = (System.Web.UI.WebControls.Literal) this.FindControl("litWeight");
     this.litOrderId      = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderId");
     this.lbltotalPrice   = (FormatedMoneyLabel)this.FindControl("lbltotalPrice");
     this.litAddDate      = (FormatedTimeLabel)this.FindControl("litAddDate");
     this.lblOrderStatus  = (OrderStatusLabel)this.FindControl("lblOrderStatus");
     this.litCloseReason  = (System.Web.UI.WebControls.Literal) this.FindControl("litCloseReason");
     this.btnRefer        = ButtonManager.Create(this.FindControl("btnRefer"));
     this.btnRefer.Click += new System.EventHandler(this.btnRefer_Click);
     if (!this.Page.IsPostBack && HiContext.Current.User.UserRole == UserRole.Member)
     {
         this.btnRefer.Text = "提交评论";
         OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId);
         if (orderInfo.OrderStatus != OrderStatus.Finished)
         {
             this.ShowMessage("订单还未完成,不能进行评价", false);
             this.btnRefer.Visible = false;
         }
         this.BindOrderItems(orderInfo);
         this.BindOrderBase(orderInfo);
     }
 }
Пример #22
0
        //Fill page with dynamic controls showing products in database
        private void GenerateShopControls()
        {
            ArrayList coffeeList = ConnectionClass.GetCoffeeByType("%");

            foreach (Coffee coffee in coffeeList)
            {
                //Create Controls
                Panel coffeePanel = new Panel();
                Image image = new Image { ImageUrl = coffee.Image, CssClass = "ProductsImage" };
                Literal literal = new Literal { Text = "<br />" };
                Literal literal2 = new Literal { Text = "<br />" };
                Label lblName = new Label { Text = coffee.Name, CssClass = "ProductsName" };
                Label lblPrice = new Label { Text = String.Format("{0:0.00}",coffee.Price) + "<br />", CssClass = "ProductsPrice" };
                TextBox textBox = new TextBox {ID = coffee.Id.ToString(), CssClass = "ProductsTextBox", Text = "0", Width = 60};

                //Add validation so only numbers can be entered into the textfields
                var validator = new RegularExpressionValidator
                                    {
                                        ValidationExpression = "^[0-9]*",
                                        ControlToValidate = textBox.ID,
                                        ErrorMessage = "Please enter a number."
                                    };

                //Add controls to Panels
                coffeePanel.Controls.Add(image);
                coffeePanel.Controls.Add(literal);
                coffeePanel.Controls.Add(lblName);
                coffeePanel.Controls.Add(literal2);
                coffeePanel.Controls.Add(lblPrice);
                coffeePanel.Controls.Add(textBox);
                coffeePanel.Controls.Add(validator);

                pnlProducts.Controls.Add(coffeePanel);
            }
        }
Пример #23
0
        protected override void AttachChildControls()
        {
            int num;

            int.TryParse(System.Web.HttpContext.Current.Request.QueryString.Get("id"), out num);
            LotteryTicketInfo lotteryTicket = VshopBrowser.GetLotteryTicket(num);

            if (lotteryTicket == null)
            {
                this.Page.ClientScript.RegisterStartupScript(base.GetType(), "myscript", "<script>$(function(){alert_h(\"活动还未开始或者已经结束!\",function(){window.location.href=\"/vshop/default.aspx\";});});</script>");
                return;
            }
            if (!(HiContext.Current.User is Member))
            {
                System.Web.HttpContext.Current.Response.Redirect("/Vshop/login.aspx?ReturnUrl=/Vshop/Tocket.aspx?id=" + num);
                return;
            }
            this.litActivityDesc        = (System.Web.UI.WebControls.Literal) this.FindControl("litActivityDesc");
            this.litPrizeNames          = (Common_PrizeNames)this.FindControl("litPrizeNames");
            this.litStartDate           = (System.Web.UI.WebControls.Literal) this.FindControl("litStartDate");
            this.litEndDate             = (System.Web.UI.WebControls.Literal) this.FindControl("litEndDate");
            this.litActivityDesc.Text   = lotteryTicket.ActivityDesc;
            this.litPrizeNames.Activity = lotteryTicket;
            this.litStartDate.Text      = lotteryTicket.OpenTime.ToString("yyyy年MM月dd日 HH:mm:ss");
            this.litEndDate.Text        = lotteryTicket.EndTime.ToString("yyyy年MM月dd日 HH:mm:ss");
            PageTitle.AddSiteNameTitle("微抽奖");
        }
Пример #24
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            _date = System.DateTime.Now;

            if (SelectedDateTime.HasValue)
                _date = SelectedDateTime.Value;

            if (ShowTime) {
                tb_minutes.Columns = 2;
                tb_hours.Columns = 2;

                tb_hours.Text = _date.Hour.ToString();
                tb_minutes.Text = fixTime(_date.Minute);
                Literal lit = new Literal();
                lit.Text = ":";

                this.Controls.Add(tb_hours);
                this.Controls.Add(lit);
                this.Controls.Add(tb_minutes);
            }

            tb_date.ID = base.ID + "_datePickField";
            this.Controls.Add(tb_date);

            AjaxControlToolkit.CalendarExtender cal = new AjaxControlToolkit.CalendarExtender();
            cal.TargetControlID = tb_date.UniqueID;
            cal.SelectedDate = _date;
            this.Controls.Add(cal);
        }
Пример #25
0
        protected override void CreateChildControls()
        {
            colon      = new Literal();
            colon.ID   = "lt_" + this.ID;
            colon.Text = ":";

            at      = new Literal();
            at.ID   = "lt_at_" + this.ID;
            at.Text = "@";

            minute          = new System.Web.UI.WebControls.TextBox();
            minute.ID       = "tb_minute" + this.ID;
            minute.CssClass = "minute";

            hour          = new System.Web.UI.WebControls.TextBox();
            hour.ID       = "tb_hour" + this.ID;
            hour.CssClass = "hour";


            tb          = new System.Web.UI.WebControls.TextBox();
            tb.ID       = "tb" + this.ID;
            tb.CssClass = "calendar";
            //this.Controls.Add(tb);

            ca = new CalendarExtender();
            DateTimeFormatInfo di = Thread.CurrentThread.CurrentCulture.DateTimeFormat;

            ca.Format          = di.ShortDatePattern;
            ca.TargetControlID = tb.ID;
            ca.ID           = "ce" + this.ID;
            ca.SelectedDate = DateTime.Now.Date.AddDays(7);

            //this.Controls.Add(ca);
        }
Пример #26
0
        protected override void AttachChildControls()
        {
            this.refundId = System.Convert.ToInt32(this.Page.Request.QueryString["RefundId"]);
            //this.RefundDetails = (Common_OrderManage_OrderItems)this.FindControl("Common_OrderManage_OrderItems");
            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.rptOrderProducts = (WapTemplatedRepeater)this.FindControl("rptOrderProducts");
            if (!this.Page.IsPostBack)
            {
                this.BindOrderRefund(this.refundId);
                OrderInfo orderInfo = TradeHelper.GetOrderInfo(this.orderId);
                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(orderInfo);
            }

            PageTitle.AddSiteNameTitle("退款申请单");

            WAPHeadName.AddHeadName("退款申请单");
        }
Пример #27
0
 protected override void Render(HtmlTextWriter writer)
 {
     Literal itmCaption = new Literal();
     itmCaption.Text = "<label for=\"" + this.ClientID + "\" class=\"" + this.CaptionCssClass + "\">" + this.Caption + "</label>";
     itmCaption.RenderControl(writer);
     base.Render(writer);
 }
Пример #28
0
 private void grdProducts_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
 {
     if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow)
     {
         System.Web.UI.WebControls.Literal literal  = (System.Web.UI.WebControls.Literal)e.Row.FindControl("litSaleStatus");
         System.Web.UI.WebControls.Literal literal2 = (System.Web.UI.WebControls.Literal)e.Row.FindControl("litMarketPrice");
         if (literal.Text == "1")
         {
             literal.Text = "出售中";
         }
         else
         {
             if (literal.Text == "2")
             {
                 literal.Text = "下架区";
             }
             else
             {
                 literal.Text = "仓库中";
             }
         }
         if (string.IsNullOrEmpty(literal2.Text))
         {
             literal2.Text = "-";
         }
     }
 }
Пример #29
0
 public void InstantiateIn(System.Web.UI.Control container)
 {
     switch (templateType)
     {
         case DataControlRowType.Header:
             {
                 Literal lc = new Literal();
                 lc.Text = columnNameFriendly;
                 container.Controls.Add(lc);
                 break;
             }
         case DataControlRowType.DataRow:
             {
                 Control field = control;
                 field.DataBinding += new EventHandler(this.field_DataBinding);
                 container.Controls.Add(field);
                 break;
             }
         case DataControlRowType.Footer:
             {
                 Control field = control;
                 field.DataBinding += new EventHandler(this.field_DataBinding);
                 container.Controls.Add(field);
                 break;
             }
     }
 }
Пример #30
0
        private void AddReportBody(Panel container)
        {
            this.reportBody = new Panel();
            this.reportBody.ID = "report";

            this.header = new ReportHeader();
            this.header.Path = ConfigurationHelper.GetReportParameter( "HeaderPath");
            this.reportBody.Controls.Add(this.header);

            this.reportTitleLiteral = new Literal();
            this.reportBody.Controls.Add(this.reportTitleLiteral);

            this.topSectionLiteral = new Literal();
            this.reportBody.Controls.Add(this.topSectionLiteral);

            this.bodyContentsLiteral = new Literal();
            this.reportBody.Controls.Add(this.bodyContentsLiteral);

            this.gridPlaceHolder = new PlaceHolder();
            this.reportBody.Controls.Add(this.gridPlaceHolder);

            this.bottomSectionLiteral = new Literal();
            this.reportBody.Controls.Add(this.bottomSectionLiteral);

            container.Controls.Add(this.reportBody);
        }
Пример #31
0
        public static Panel BuildCategoryPanel(BlogEntry entry)
        {
            Panel categoriesPanel = new Panel();
            categoriesPanel.CssClass = "blogPostLabel";
            categoriesPanel.Style.Add(HtmlTextWriterStyle.TextAlign, "right");

            if (entry.Categories.Count > 0)
            {
                String category = entry.Categories[0];
                HyperLink hyperLink = new HyperLink();
                hyperLink.NavigateUrl = "blog.aspx?label=" + category;
                hyperLink.Text = category;
                categoriesPanel.Controls.Add(hyperLink);
            }

            for (int i = 1; i < entry.Categories.Count; i++)
            {
                String category = entry.Categories[i];
                Literal labelSeparator = new Literal();
                labelSeparator.Text = ", ";
                categoriesPanel.Controls.Add(labelSeparator);

                HyperLink hyperLink = new HyperLink();
                hyperLink.NavigateUrl = "blog.aspx?label=" + category;
                hyperLink.Text = category;
                categoriesPanel.Controls.Add(hyperLink);
            }

            return categoriesPanel;
        }
Пример #32
0
        private void grdExpressTemplates_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
        {
            System.Web.UI.WebControls.GridViewRow gridViewRow = (System.Web.UI.WebControls.GridViewRow)((System.Web.UI.Control)e.CommandSource).NamingContainer;
            int num = (int)this.grdExpressTemplates.DataKeys[gridViewRow.RowIndex].Value;

            if (e.CommandName == "SetYesOrNo")
            {
                SalesHelper.SetExpressIsUse(num);
                this.BindExpressTemplates();
                return;
            }
            if (!(e.CommandName == "DeleteRow"))
            {
                if (e.CommandName == "IsDefault")
                {
                    SettingsHelper.SetExpressIsDefault(num);
                    this.BindExpressTemplates();
                }
                return;
            }
            if (SalesHelper.DeleteExpressTemplate(num))
            {
                System.Web.UI.WebControls.Literal literal = this.grdExpressTemplates.Rows[gridViewRow.RowIndex].FindControl("litXmlFile") as System.Web.UI.WebControls.Literal;
                this.DeleteXmlFile(literal.Text);
                this.BindExpressTemplates();
                this.ShowMsg("已经成功删除选择的快递单模板", true);
                return;
            }
            this.ShowMsg("删除快递单模板失败", false);
        }
Пример #33
0
 public System.Web.UI.Control AddTo(System.Web.UI.Control container, ViewContext context)
 {
     Literal l = new Literal();
     l.Text = "Template:" + Name;
     container.Controls.Add(l);
     return l;
 }
Пример #34
0
 public void InstantiateIn(Control container)
 {
     l = new Literal();
     l.ID = id;
     l.Text = "&nbsp";
     container.Controls.Add(l);
 }
Пример #35
0
 protected override void AttachChildControls()
 {
     this.txtShipTo                       = (System.Web.UI.WebControls.TextBox) this.FindControl("txtShipTo");
     this.txtShippingId                   = (System.Web.UI.WebControls.TextBox) this.FindControl("txtShippingId");
     this.txtAddress                      = (System.Web.UI.WebControls.TextBox) this.FindControl("txtAddress");
     this.txtZipcode                      = (System.Web.UI.WebControls.TextBox) this.FindControl("txtZipcode");
     this.txtTelPhone                     = (System.Web.UI.WebControls.TextBox) this.FindControl("txtTelPhone");
     this.txtCellPhone                    = (System.Web.UI.WebControls.TextBox) this.FindControl("txtCellPhone");
     this.dropRegionsSelect               = (RegionSelector)this.FindControl("dropRegions");
     this.btnAddAddress                   = ButtonManager.Create(this.FindControl("btnAddAddress"));
     this.dtlstRegionsSelect              = (Common_Address_AddressList)this.FindControl("list_Common_Consignee_ConsigneeList");
     this.lblAddressCount                 = (System.Web.UI.WebControls.Literal) this.FindControl("lblAddressCount");
     this.btnAddAddress.Click            += new System.EventHandler(this.btnAddAddress_Click);
     this.dtlstRegionsSelect.ItemCommand += new Common_Address_AddressList.CommandEventHandler(this.dtlstRegionsSelect_ItemCommand);
     PageTitle.AddSiteNameTitle("我的收货地址");
     if (!this.Page.IsPostBack)
     {
         this.lblAddressCount.Text = HiContext.Current.Config.ShippingAddressQuantity.ToString();
         this.dropRegionsSelect.DataBind();
         this.Reset();
         this.BindList();
         try
         {
             Member member = HiContext.Current.User as Member;
             if (member != null)
             {
                 this.txtShipTo.Text    = member.RealName;
                 this.txtCellPhone.Text = member.CellPhone;
             }
         }
         catch (Exception ee)
         { }
     }
 }
Пример #36
0
 private void FindControls()
 {
     this.rptProductImages      = (WapTemplatedRepeater)this.FindControl("rptProductImages");
     this.litProdcutName        = (System.Web.UI.WebControls.Literal) this.FindControl("litProdcutName");
     this.litShortDescription   = (System.Web.UI.WebControls.Literal) this.FindControl("litShortDescription");
     this.litDescription        = (System.Web.UI.WebControls.Literal) this.FindControl("litDescription");
     this.litSoldCount          = (System.Web.UI.WebControls.Literal) this.FindControl("soldCount");
     this.litprice              = (System.Web.UI.WebControls.Literal) this.FindControl("price");
     this.litcontent            = (System.Web.UI.WebControls.Literal) this.FindControl("content");
     this.litminCount           = (System.Web.UI.WebControls.Literal) this.FindControl("minCount");
     this.litGroupBuyId         = (System.Web.UI.HtmlControls.HtmlInputControl) this.FindControl("litGroupbuyId");
     this.litLeftSeconds        = (System.Web.UI.WebControls.Literal) this.FindControl("leftSeconds");
     this.skuSelector           = (Common_SKUSelector)this.FindControl("skuSelector");
     this.linkDescription       = (System.Web.UI.WebControls.HyperLink) this.FindControl("linkDescription");
     this.expandAttr            = (Common_ExpandAttributes)this.FindControl("ExpandAttributes");
     this.salePrice             = (System.Web.UI.WebControls.Literal) this.FindControl("salePrice");
     this.leftCount             = (System.Web.UI.WebControls.Literal) this.FindControl("leftCount");
     this.minSuccessCount       = (System.Web.UI.WebControls.Literal) this.FindControl("minSuccessCount");
     this.txtProductId          = (System.Web.UI.HtmlControls.HtmlInputControl) this.FindControl("txtProductId");
     this.litConsultationsCount = (System.Web.UI.WebControls.Literal) this.FindControl("litConsultationsCount");
     this.litReviewsCount       = (System.Web.UI.WebControls.Literal) this.FindControl("litReviewsCount");
     this.litMaxCount           = (System.Web.UI.WebControls.Literal) this.FindControl("litMaxCount");
     this.startTime             = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("startTime");
     this.endTime                = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("endTime");
     this.groupBuySoldCount      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("groupBuySoldCount");
     this.groupBuyMinCount       = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("groupBuyMinCount");
     this.litGroupbuyDescription = (System.Web.UI.WebControls.Literal) this.FindControl("litGroupbuyDescription");
     this.groupBuyMaxCount       = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("groupBuyMaxCount");
 }
Пример #37
0
        private void ResolveGridView(Control ctrl)
        {
            for (int i = 0; i < ctrl.Controls.Count; i++)
            {
                // 图片的完整URL
                if (ctrl.Controls[i].GetType() == typeof(AspNet.Image))
                {
                    AspNet.Image img = ctrl.Controls[i] as AspNet.Image;
                    img.ImageUrl = Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, Page.ResolveUrl(img.ImageUrl));
                }

                // 将CheckBox控件转化为静态文本
                if (ctrl.Controls[i].GetType() == typeof(AspNet.CheckBox))
                {
                    Literal lit = new Literal();
                    lit.Text = (ctrl.Controls[i] as AspNet.CheckBox).Checked ? "√" : "×";
                    ctrl.Controls.RemoveAt(i);
                    ctrl.Controls.AddAt(i, lit);
                }

                if (ctrl.Controls[i].HasControls())
                {
                    ResolveGridView(ctrl.Controls[i]);
                }

            }
        }
Пример #38
0
 protected void rptList_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == System.Web.UI.WebControls.ListItemType.Item || e.Item.ItemType == System.Web.UI.WebControls.ListItemType.AlternatingItem)
     {
         int    num  = (int)System.Web.UI.DataBinder.Eval(e.Item.DataItem, "Depth");
         string text = System.Web.UI.DataBinder.Eval(e.Item.DataItem, "Name").ToString();
         if (num == 1)
         {
             text = "<b>" + text + "</b>";
         }
         else
         {
             System.Web.UI.HtmlControls.HtmlGenericControl htmlGenericControl = e.Item.FindControl("spShowImage") as System.Web.UI.HtmlControls.HtmlGenericControl;
             htmlGenericControl.Visible = false;
         }
         for (int i = 1; i < num; i++)
         {
             text = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + text;
         }
         System.Web.UI.WebControls.Literal literal = e.Item.FindControl("lblCategoryName") as System.Web.UI.WebControls.Literal;
         literal.Text = text;
         System.Web.UI.WebControls.HiddenField hiddenField = e.Item.FindControl("hdfCategoryID") as System.Web.UI.WebControls.HiddenField;
         hiddenField.Value = System.Web.UI.DataBinder.Eval(e.Item.DataItem, "CategoryID").ToString();
     }
 }
Пример #39
0
 public void InstantiateIn(Control container)
 {
     l = new Literal();
     l.ID = id;
     l.Text = "<span class=\"veti\">" + id + "-CTO</span>";
     container.Controls.Add(l);
 }
Пример #40
0
        protected void shoppingCartGiftList_ItemCommand(object sender, System.Web.UI.WebControls.DataListCommandEventArgs e)
        {
            System.Web.UI.Control             control = e.Item.Controls[0];
            System.Web.UI.WebControls.TextBox textBox = (System.Web.UI.WebControls.TextBox)control.FindControl("txtBuyNum");
            System.Web.UI.WebControls.Literal literal = (System.Web.UI.WebControls.Literal)control.FindControl("litGiftId");
            int num;

            if (!int.TryParse(textBox.Text, out num) || textBox.Text.IndexOf(".") != -1)
            {
                this.ShowMessage("兑换数量必须为整数", false);
            }
            else
            {
                if (num <= 0)
                {
                    this.ShowMessage("兑换数量必须为大于0的整数", false);
                }
                else
                {
                    if (e.CommandName == "updateBuyNum")
                    {
                        ShoppingCartProcessor.UpdateGiftItemQuantity(System.Convert.ToInt32(literal.Text), num, PromoteType.NotSet);
                    }
                    if (e.CommandName == "delete")
                    {
                        ShoppingCartProcessor.RemoveGiftItem(System.Convert.ToInt32(literal.Text), PromoteType.NotSet);
                    }
                    this.Page.Response.Redirect(Globals.GetSiteUrls().UrlData.FormatUrl("shoppingCart"), true);
                }
            }
        }
Пример #41
0
 private void reDistributor_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == System.Web.UI.WebControls.ListItemType.Item || e.Item.ItemType == System.Web.UI.WebControls.ListItemType.AlternatingItem)
     {
         System.Web.UI.WebControls.Literal literal = (System.Web.UI.WebControls.Literal)e.Item.FindControl("litph");
         this.i++;
         if (this.i == 1)
         {
             literal.Text = "<img src=\"../images/0001.gif\"></img>";
         }
         else
         {
             if (this.i == 2)
             {
                 literal.Text = "<img src=\"../images/0002.gif\"></img>";
             }
             else
             {
                 if (this.i == 3)
                 {
                     literal.Text = "<img src=\"../images/0003.gif\"></img>";
                 }
                 else
                 {
                     literal.Text = "<span style=\"padding-left:10px;\">" + (int.Parse(literal.Text) + this.i).ToString() + "</span>";
                 }
             }
         }
     }
 }
Пример #42
0
        public void LoadControl()
        {
            if (this.purchaseOrder.PurchaseStatus != OrderStatus.Finished)
            {
                if (this.purchaseOrder.PurchaseStatus != OrderStatus.SellerAlreadySent)
                {
                    this.lblModeName.Text = this.purchaseOrder.ModeName;
                    goto IL_4C;
                }
            }
            this.lblModeName.Text = this.purchaseOrder.RealModeName;
IL_4C:
            this.litFreight.Text    = Globals.FormatMoney(this.purchaseOrder.AdjustedFreight);
            this.litDiscount.Text   = this.purchaseOrder.AdjustedDiscount.ToString();
            this.litTotalPrice.Text = Globals.FormatMoney(this.purchaseOrder.GetPurchaseTotal());
            if (this.purchaseOrder.Tax > 0m)
            {
                this.litTax.Text = "<tr class=\"bg\"><td align=\"right\">税金(元):</td><td colspan=\"2\"><span class='Name'>" + Globals.FormatMoney(this.purchaseOrder.Tax);
                System.Web.UI.WebControls.Literal expr_E3 = this.litTax;
                expr_E3.Text += "</span></td></tr>";
            }
            if (!string.IsNullOrEmpty(this.purchaseOrder.InvoiceTitle))
            {
                this.litInvoiceTitle.Text = "<tr class=\"bg\"><td align=\"right\">发票抬头:</td><td colspan=\"2\"><span class='Name'>" + this.purchaseOrder.InvoiceTitle;
                System.Web.UI.WebControls.Literal expr_130 = this.litInvoiceTitle;
                expr_130.Text += "</span></td></tr>";
            }
        }
        public override Control DataEditorControls(XmlNode xml, Dictionary<string, object> properties)
        {
            //properties should be multiType properties ie. Name, Description, Mandatory, Validation
            Panel pnlDataEditor = new Panel();

            Label lblDataEditor = new Label() { Text = properties["Name"].ToString() };
            Literal litDescription = new Literal() { Text = properties["Description"].ToString() };

            dtpDataEditor = new umbraco.uicontrols.DatePicker.DateTimePicker();

            if (properties.ContainsKey("ShowTime"))
            {
                boolShowTime = bool.Parse(properties["ShowTime"].ToString());
                dtpDataEditor.ShowTime = boolShowTime;
            }

            if (xml != null)
            {
                //Anything special about the xml? no - just do innertext
                dtpDataEditor.DateTime = Convert.ToDateTime(xml.InnerText);
            }
            
            pnlDataEditor.Controls.Add(lblDataEditor);
            pnlDataEditor.Controls.Add(litDescription);
            pnlDataEditor.Controls.Add(dtpDataEditor);

            if (xml != null)
            {
                //Anything special about the xml? no - just do innertext
                dtpDataEditor.DateTime = Convert.ToDateTime(xml.InnerText);
            }

            return pnlDataEditor;
        }
Пример #44
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
          //if(Context.Session["PassWord"]==null||Convert.ToString(Context.Session["PassWord"])=="")
          //{
              
          //    Context.Response.Redirect("Index.aspx?mfiid="+BlogContext.Current.MFiiD+"&afiid="+BlogContext.Current.AFiiD);

          //}
            //if (Convert.ToString(Context.Session["PassWord"]) != BWeblog_log.GetPW(Convert.ToInt32( Context.Request["logid"])))
            //{
            //    Context.Response.Redirect("Index.aspx?mfiid=" + BlogContext.Current.MFiiD + "&afiid=" + BlogContext.Current.AFiiD);
            //}
            EnReply = (Panel)Skin.FindControl("EnReply");
            ReplyAlert = (Literal)Skin.FindControl("ReplyAlert");
            View_WeblogUserLog WL = BWeblog_log.GetByIDAndFiid(blogContext.LogId,blogContext.MFiiD);
            if (WL == null)
            {
                Context.Response.Write("<script>alert('该文章不存在或已经删除!');top.window.location='/" + blogContext.Context.Request.QueryString["Domain"] + "';</script>");
                Context.Response.End();
            }
            if (Convert.ToBoolean(WL.Log_IsEnRePly))
            {
                EnReply.Visible = true;
                ReplyAlert.Visible = false;
            }
            else
            {
                EnReply.Visible = false;
                ReplyAlert.Visible = true;
            }

            Globals.UpdateLogByRssLink(blogContext.BlogUserId);
        }
Пример #45
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("限时抢购");
        }
Пример #46
0
 protected void Page_Load(object sender, EventArgs e)
 {
     // Inject the proper stylesheet in page head
     Literal l = new Literal();
     l.Text = Tools.GetIncludes(DetectNamespace());
     Page.Header.Controls.Add(l);
 }
Пример #47
0
 private void grdProducts_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
 {
     if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow)
     {
         System.Web.UI.WebControls.Literal literal = (System.Web.UI.WebControls.Literal)e.Row.FindControl("litMainCategory");
         literal.Text = "-";
         object obj2 = System.Web.UI.DataBinder.Eval(e.Row.DataItem, "CategoryId");
         if (obj2 != null && obj2 != System.DBNull.Value)
         {
             literal.Text = CatalogHelper.GetFullCategory((int)obj2);
         }
         ProductCategoriesDropDownList list = (ProductCategoriesDropDownList)e.Row.FindControl("dropAddToCategories");
         list.DataBind();
         System.Web.UI.WebControls.Literal literal2 = (System.Web.UI.WebControls.Literal)e.Row.FindControl("litExtendCategory");
         literal2.Text = "-";
         object obj3 = System.Web.UI.DataBinder.Eval(e.Row.DataItem, "ExtendCategoryPath");
         if (obj3 != null && obj3 != System.DBNull.Value)
         {
             string s = (string)obj3;
             if (s.Length > 0)
             {
                 s = s.Substring(0, s.Length - 1);
                 if (s.Contains("|"))
                 {
                     s = s.Substring(s.LastIndexOf('|') + 1);
                 }
                 literal2.Text      = CatalogHelper.GetFullCategory(int.Parse(s));
                 list.SelectedValue = new int?(int.Parse(s));
             }
         }
     }
 }
Пример #48
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Literal LinkText = new Literal();
            LinkText.Text = ElementLabelLiteral;
            Ux_forgot_pwd_link.Controls.Add(LinkText);
            string[] pathparts = Request.Url.Segments;
            StringBuilder sb = new StringBuilder();

            String URI = Request.Url.ToString();
             for (int i = 0; i < pathparts.Length - 1; i++)
            {
                sb.Append(pathparts[i]);
            }
           // if (pathparts[3] == "login_e.aspx") // rfg 2.20
            if(URI.Contains("login_e.aspx"))
            {
                sb.Append("login_forgotpwd_e.aspx?");
            }
            else
            {
                sb.Append("login_forgotpwd.aspx?");
            }
            NameValueCollection oldquery = new NameValueCollection(Request.QueryString.Count, Request.QueryString);
            oldquery.Remove("sent");
            utility.append_querystring(sb, oldquery, sb.Length);
            Ux_forgot_pwd_link.NavigateUrl = sb.ToString();
        }
Пример #49
0
        /// <summary>
        /// Creates a multi-line <see cref="System.Web.UI.WebControls.TextBox">TextBox</see> with a class
        /// called 'markdown-editor'. All Javascript and CSS files are added to the page.
        /// </summary>
        protected override System.Web.UI.Control AddEditor(System.Web.UI.Control container)
        {
            Page page = HttpContext.Current.Handler as System.Web.UI.Page;

            if (page == null)
            {
                Literal literalError = new Literal() { Text = "unable to get current page from HttpContext.Current.Handler!" };
                container.Controls.Add(literalError);
                return literalError;
            }
            else
            {

                page.Header.Controls.Add(new Literal() { Text = "<link rel=\"stylesheet\" type=\"text/css\" href=\"/Addons/Markdown/Wmd/wmd.css\" />" });
                page.Header.Controls.Add(new Literal() { Text = "<script type=\"text/javascript\" src=\"/Addons/Markdown/Wmd/showdown.js\"></script>" });
                page.Header.Controls.Add(new Literal() { Text = "<script type=\"text/javascript\" src=\"/Addons/Markdown/Wmd/wmd.js\"></script>" });

                container.Controls.Add(new Literal() { Text = "<div id=\"wmd-button-bar\" class=\"wmd-panel\"></div>" });

                // Make the control
                TextBox textbox = new TextBox();
                textbox.CssClass = "wmd-panel wmd-textarea";
                textbox.TextMode = TextBoxMode.MultiLine;
                container.Controls.Add(textbox);

                return textbox;
            }
        }
Пример #50
0
 protected override void AttachChildControls()
 {
     PageTitle.AddSiteNameTitle("会员中心");
     MemberInfo currentMember = MemberProcessor.GetCurrentMember();
     if (currentMember != null)
     {
         this.litUserName = (Literal) this.FindControl("litUserName");
         this.litExpenditure = (Literal) this.FindControl("litExpenditure");
         this.litExpenditure.SetWhenIsNotNull(currentMember.Expenditure.ToString("F2"));
         this.litMemberGrade = (Literal) this.FindControl("litMemberGrade");
         MemberGradeInfo memberGrade = MemberProcessor.GetMemberGrade(currentMember.GradeId);
         if (memberGrade != null)
         {
             this.litMemberGrade.SetWhenIsNotNull(memberGrade.Name);
         }
         this.litUserName.Text = string.IsNullOrEmpty(currentMember.RealName) ? currentMember.UserName : currentMember.RealName;
         this.Page.Session["stylestatus"] = "1";
         this.litWaitForRecieveCount = (Literal) this.FindControl("litWaitForRecieveCount");
         this.litWaitForPayCount = (Literal) this.FindControl("litWaitForPayCount");
         OrderQuery query = new OrderQuery {
             Status = OrderStatus.WaitBuyerPay
         };
         int userOrderCount = MemberProcessor.GetUserOrderCount(Globals.GetCurrentMemberUserId(), query);
         this.litWaitForPayCount.SetWhenIsNotNull(userOrderCount.ToString());
         query.Status = OrderStatus.SellerAlreadySent;
         this.litWaitForRecieveCount.SetWhenIsNotNull(MemberProcessor.GetUserOrderCount(Globals.GetCurrentMemberUserId(), query).ToString());
     }
 }
        public static SimpleFieldTemplateUserControl CreateTextTemplate(MetaColumn column, bool readOnly) {
            SimpleFieldTemplateUserControl control = new SimpleFieldTemplateUserControl();
            if (readOnly) {
                var literal = new Literal();
                literal.DataBinding += (sender, e) => {
                    literal.Text = control.FieldValueString;
                };
                control.Controls.Add(literal);
            }
            else {
                var textBox = new TextBox();                
                textBox.DataBinding += (sender, e) => {                    
                    textBox.Text = control.FieldValueEditString;                    
                };
                // Logic copied from BoundField
                if (column.ColumnType.IsPrimitive) {
                    textBox.Columns = 5;
                }
                control._valueExtrator = () => textBox.Text;
                textBox.CssClass = "DDTextBox";
                textBox.ID = TextBoxID;
                control.Controls.Add(textBox);
                control.CreateValidators(column);
            }

            return control;
        }
Пример #52
0
 private void grdHeaderMenu_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
 {
     if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow)
     {
         int num = (int)this.grdMyHeaderMenu.DataKeys[e.Row.RowIndex].Value;
         System.Web.UI.WebControls.HyperLink hyperLink = e.Row.FindControl("lkbEdit") as System.Web.UI.WebControls.HyperLink;
         hyperLink.NavigateUrl = string.Format("EditMyHeaderMenu.aspx?Id={0}&ThemName={1}", num, this.themName);
         System.Web.UI.WebControls.Literal literal = e.Row.FindControl("litCategory") as System.Web.UI.WebControls.Literal;
         string text = literal.Text;
         if (text == "1")
         {
             text = "系统页面";
         }
         else
         {
             if (text == "2")
             {
                 text = "商品搜索链接";
             }
             else
             {
                 text = "自定义链接";
             }
         }
         literal.Text = text;
     }
 }
        public Literal navbar()
        {
            Literal nav = new Literal();

               nav.Text = "<div class='header'>"
                + "<div class='header-left'>" + "<img src='images/logoUNISON.gif'/></div>"
               + "<div class='header-right'>"
              + "<ul class='nav1'>"
                   + "<li><a href='Trsaccion.aspx'>Salidas</a></li>"
                    + "<li><a href='AddProducts.aspx'>Entradas</a></li>"
                   + "<li><a href='#'>Consultas</a>"

                   + "<ul>"
                   + "<li><a href='consulta_por_nombre.aspx'>Nombre</a></li>"
                   + "<li><a href='consulta_por_codigo.aspx'>Código</a></li>"
                   +"</ul></li>"

                    + "<li><a href='AddModulo.aspx'>Agregar Módulo</a></li>"
                    + "<li><a href='agregar_usuario.aspx'>Agregar Personal</a></li>"
                    + "<li><a href='Reportes.aspx'>Reportes</a></li>"
                    + "<li><a href='index.aspx'>Logout</a></li>"
               + "</ul>"
               + "</div>"
              + "</div>";

               return nav;
        }
Пример #54
0
 protected override void AttachChildControls()
 {
     this.rptProduct              = (ThemedTemplatedRepeater)this.FindControl("rptProduct");
     this.pager                   = (Pager)this.FindControl("pager");
     this.litBrandProductResult   = (System.Web.UI.WebControls.Literal) this.FindControl("litBrandProductResult");
     this.cutdownSearch           = (Common_CutdownSearch)this.FindControl("search_Common_CutdownSearch");
     this.btnSortPrice            = (Common_Search_SortPrice)this.FindControl("btn_Common_Search_SortPrice");
     this.btnSortTime             = (Common_Search_SortTime)this.FindControl("btn_Common_Search_SortTime");
     this.btnSortPopularity       = (Common_Search_SortPopularity)this.FindControl("btn_Common_Search_SortPopularity");
     this.btnSortSaleCounts       = (Common_Search_SortSaleCounts)this.FindControl("btn_Common_Search_SortSaleCounts");
     this.cutdownSearch.ReSearch += new Common_CutdownSearch.ReSearchEventHandler(this.cutdownSearch_ReSearch);
     this.btnSortPrice.Sorting   += new Common_Search_SortTime.SortingHandler(this.btnSortPrice_Sorting);
     this.btnSortTime.Sorting    += new Common_Search_SortTime.SortingHandler(this.btnSortTime_Sorting);
     if (this.btnSortPopularity != null)
     {
         this.btnSortPopularity.Sorting += new Common_Search_SortPopularity.SortingHandler(this.btnSortPopularity_Sorting);
     }
     if (this.btnSortSaleCounts != null)
     {
         this.btnSortSaleCounts.Sorting += new Common_Search_SortSaleCounts.SortingHandler(this.btnSortSaleCounts_Sorting);
     }
     if (!this.Page.IsPostBack)
     {
         this.BindBrandProduct();
     }
 }
Пример #55
0
        protected override void AttachChildControls()
        {
            this.litAmount        = (FormatedMoneyLabel)this.FindControl("litAmount");
            this.litUsername      = (System.Web.UI.WebControls.Literal) this.FindControl("litUsername");
            this.litTrueName      = (System.Web.UI.WebControls.Literal) this.FindControl("litTrueName");
            this.litOrderCount    = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderCount");
            this.litTelphone      = (System.Web.UI.WebControls.Literal) this.FindControl("litTelphone");
            this.litCreateTime    = (System.Web.UI.WebControls.Literal) this.FindControl("litCreateTime");
            this.litLastOrderTime = (System.Web.UI.WebControls.Literal) this.FindControl("litLastOrderTime");
            PageTitle.AddSiteNameTitle("下级会员详情");
            int userId = 0;

            if (!string.IsNullOrEmpty(this.Page.Request.QueryString["UserID"]))
            {
                int.TryParse(this.Page.Request.QueryString["UserID"], out userId);
            }
            SubMember mySubUser = MemberProcessor.GetMySubUser(userId);

            if (mySubUser == null)
            {
                this.ShowMessage("错误的会员ID", false);
            }
            if (this.litAmount != null)
            {
                this.litAmount.Money = mySubUser.SubMemberSplittin;
            }
            this.litUsername.Text   = mySubUser.UserName;
            this.litTrueName.Text   = mySubUser.RealName;
            this.litOrderCount.Text = mySubUser.OrderNumber.ToString();
            this.litTelphone.Text   = mySubUser.CellPhone;
            this.litCreateTime.Text = mySubUser.CreateDate.ToString("yyyy-MM-dd hh:mm:ss");
        }
Пример #56
0
        //protected Panel panelUpcomings;
        //protected Label lblUpcomingTitle;

        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.PreRender"/> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
        protected override void OnPreRender(EventArgs e)
        {
            //base.OnPreRender(e);
            
            foreach (DateTime selectedDate in MyCalendar.SelectedDates)
            {
                foreach (var item in CalendarEvents)
                {
                    var eventDate = (DateTime)item["PublishDate"];
                    if (eventDate.Year == selectedDate.Year && eventDate.Month == selectedDate.Month && eventDate.Day == selectedDate.Day)
                    {
                        var lit = new Literal
                        {
                            Text = String.Format("<div class=\"book-calendar-link\"><a href=\"{0}\">{2}: {1} </a> <div class=\"book-calendar-date\">({3})</div></div>",
                                                                item.Path, item["DisplayName"],
                                                                item["Author"],
                                                                eventDate.ToShortDateString())
                        };
                        panelUpcomings.Controls.Add(lit);
                    }
                }
            }

            if (MyCalendar.SelectedDates.Count == 1)
            {
                lblUpcomingTitle.Text = String.Format("Books to be pulished on {0}", MyCalendar.SelectedDates[0].ToShortDateString());
            }
            else if (MyCalendar.SelectedDates.Count > 1)
            {
                lblUpcomingTitle.Text = String.Format("Books to be pulished between {0} and {1}", MyCalendar.SelectedDates[0].ToShortDateString(), MyCalendar.SelectedDates[MyCalendar.SelectedDates.Count - 1].ToShortDateString());
            }
        }
Пример #57
0
			public void InstantiateIn(Control container)
			{
				Literal l = new Literal();
				l.Text = "<div>";
				l.DataBinding += new EventHandler(this.BindData);
				container.Controls.Add(l);
			}
Пример #58
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (_questionnaire.Company_Code == Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["Company_HPI"]))
            {
                if (Wucs != null)
                {
                    string title = "";
                    if (PageAssembly.Page.PageTitle != null)
                        title = PageAssembly.Page.PageTitle;

                    Ux_Title.Text = title;
                    Ux_Headline.Text = title;
                    foreach (WucPageElementBase elem in Wucs)
                    {
#if DEBUG
                        System.Web.UI.WebControls.Literal Comment = new System.Web.UI.WebControls.Literal();
                        Comment.Text = WebConstants.NewLine + "<!-- " + elem.PageElementType.ToString() + " -->" + WebConstants.NewLine;
                        Ux_Content.Controls.Add(Comment);
#endif
                        Ux_Content.Controls.Add(elem);
                    }
                }//else: there should be a redirect from RfgExternalPage
            }
            else
            {
                String URI = Request.Url.ToString();
                URI = URI.Replace("/closure", "/closure_e");
                Response.Redirect(URI);
            }
        }
Пример #59
0
        protected override void AttachChildControls()
        {
            PageTitle.AddSiteNameTitle("推广员");
            Member member = HiContext.Current.User as Member;

            if (member == null)
            {
                return;
            }
            this.litUserLink       = (System.Web.UI.WebControls.Literal) this.FindControl("litUserLink");
            this.litUserName       = (System.Web.UI.WebControls.Literal) this.FindControl("litUserName");
            this.litPaymentBalance = (System.Web.UI.WebControls.Literal) this.FindControl("litPaymentBalance");
            this.litExpenditure    = (System.Web.UI.WebControls.Literal) this.FindControl("litExpenditure");
            this.litExpenditure.SetWhenIsNotNull(member.Expenditure.ToString("F2"));
            this.litPaymentBalance.SetWhenIsNotNull(member.Balance.ToString("F2"));
            this.litPoints = (System.Web.UI.WebControls.Literal) this.FindControl("litPoints");
            this.litPoints.SetWhenIsNotNull(member.Points.ToString("F2"));
            this.litMemberGrade = (System.Web.UI.WebControls.Literal) this.FindControl("litMemberGrade");
            MemberGradeInfo memberGrade = MemberProcessor.GetMemberGrade(member.GradeId);

            if (memberGrade != null)
            {
                this.litMemberGrade.SetWhenIsNotNull(memberGrade.Name);
            }
            this.litUserName.Text = (string.IsNullOrEmpty(member.RealName) ? member.Username : member.RealName);
        }
Пример #60
0
        protected void shoppingCartProductList_ItemCommand(object sender, System.Web.UI.WebControls.DataListCommandEventArgs e)
        {
            System.Web.UI.Control             control = e.Item.Controls[0];
            System.Web.UI.WebControls.TextBox textBox = (System.Web.UI.WebControls.TextBox)control.FindControl("txtBuyNum");
            System.Web.UI.WebControls.Literal literal = (System.Web.UI.WebControls.Literal)control.FindControl("litSkuId");
            int num;

            if (!int.TryParse(textBox.Text, out num) || textBox.Text.IndexOf(".") != -1)
            {
                this.ShowMessage("购买数量必须为整数", false);
                return;
            }
            if (num <= 0)
            {
                this.ShowMessage("购买数量必须为大于0的整数", false);
                return;
            }
            if (e.CommandName == "updateBuyNum")
            {
                if (ShoppingCartProcessor.GetSkuStock(literal.Text.Trim()) < num)
                {
                    this.ShowMessage("该商品库存不够", false);
                    this.btnCheckout.Visible = false;
                    return;
                }
                ShoppingCartProcessor.UpdateLineItemQuantity(literal.Text, num);
            }
            if (e.CommandName == "delete")
            {
                ShoppingCartProcessor.RemoveLineItem(literal.Text);
            }
            this.Page.Response.Redirect(Globals.GetSiteUrls().UrlData.FormatUrl("shoppingCart") + "?productSkuId=" + literal.Text, true);
        }