protected override void Render(HtmlTextWriter writer)
        {
            base.Text = "";
            DataTable tags = ControlProvider.Instance().GetTags();

            if (tags.Rows.Count < 0)
            {
                base.Text = "无";
            }
            else
            {
                foreach (DataRow row in tags.Rows)
                {
                    string str = "";
                    if (this._selectvalue != null)
                    {
                        foreach (int num in this._selectvalue)
                        {
                            if (num == Convert.ToInt32(row["TagID"].ToString()))
                            {
                                str = "checked=\"checked\"";
                            }
                        }
                    }
                    string text = base.Text;
                    base.Text = text + "<input type=\"checkbox\" onclick=\"javascript:CheckTagId(this)\" value=\"" + row["TagID"].ToString() + "\" " + str + "/>" + row["TagName"].ToString() + " ";
                }
                base.Render(writer);
            }
        }
Exemple #2
0
 public override void DataBind()
 {
     this.Items.Clear();
     foreach (ShippingModeInfo info in ControlProvider.Instance().GetShippingModes())
     {
         string name = info.Name;
         this.Items.Add(new ListItem(name, info.ModeId.ToString(CultureInfo.InvariantCulture)));
     }
 }
Exemple #3
0
 public override void DataBind()
 {
     base.Items.Clear();
     foreach (DataRow row in ControlProvider.Instance().GetTags().Rows)
     {
         ListItem item = new ListItem(Globals.HtmlEncode(row["TagName"].ToString()), row["TagID"].ToString());
         base.Items.Add(item);
     }
 }
        public override void DataBind()
        {
            this.Items.Clear();
            IList <ShippingModeInfo> shippingModes = ControlProvider.Instance().GetShippingModes();

            foreach (ShippingModeInfo current in shippingModes)
            {
                string name = current.Name;
                this.Items.Add(new ListItem(name, current.ModeId.ToString(CultureInfo.InvariantCulture)));
            }
        }
 public override void DataBind()
 {
     base.Items.Clear();
     if (AllowNull)
     {
         base.Items.Add(new ListItem(NullToDisplay, string.Empty));
     }
     foreach (ProductLineInfo info in ControlProvider.Instance().GetProductLineList())
     {
         base.Items.Add(new ListItem(Globals.HtmlDecode(info.Name), info.LineId.ToString()));
     }
 }
 public override void DataBind()
 {
     base.Items.Clear();
     if (this.AllowNull)
     {
         base.Items.Add(new ListItem(this.NullToDisplay, string.Empty));
     }
     foreach (ShippingModeInfo info in ControlProvider.Instance().GetShippingModes())
     {
         base.Items.Add(new ListItem(info.Name, info.ModeId.ToString()));
     }
 }
Exemple #7
0
        public override void DataBind()
        {
            this.Items.Clear();
            base.Items.Add(new ListItem("--任意--", "0"));
            DataTable table = new DataTable();

            foreach (DataRow row in ControlProvider.Instance().GetBrandCategories().Rows)
            {
                int num = (int)row["BrandId"];
                this.Items.Add(new ListItem((string)row["BrandName"], num.ToString(CultureInfo.InvariantCulture)));
            }
        }
 public override void DataBind()
 {
     base.Items.Clear();
     if (this.AllowNull)
     {
         base.Items.Add(new ListItem(this.NullToDisplay, string.Empty));
     }
     foreach (DataRow row in ControlProvider.Instance().GetTags().Rows)
     {
         ListItem item = new ListItem(Globals.HtmlDecode(row["TagName"].ToString()), row["TagID"].ToString());
         base.Items.Add(item);
     }
 }
 public override void DataBind()
 {
     Items.Clear();
     foreach (ShippingModeInfo info in ControlProvider.Instance().GetShippingModes())
     {
         string name = info.Name;
         if (info.Description != "")
         {
             name = name + "(" + info.Description + ")";
         }
         Items.Add(new ListItem(name, info.ModeId.ToString(CultureInfo.InvariantCulture)));
     }
 }
        public override void DataBind()
        {
            this.Items.Clear();
            IList <ProductTypeInfo> productTypes = ControlProvider.Instance().GetProductTypes();

            if (this.AllowNull)
            {
                base.Items.Add(new ListItem(this.NullToDisplay, string.Empty));
            }
            foreach (ProductTypeInfo current in productTypes)
            {
                base.Items.Add(new ListItem(current.TypeName, current.TypeId.ToString()));
            }
        }
        public override void DataBind()
        {
            base.Items.Clear();
            if (this.AllowNull)
            {
                base.Items.Add(new ListItem(this.NullToDisplay, string.Empty));
            }
            IList <ShippingModeInfo> shippingModes = ControlProvider.Instance().GetShippingModes();

            foreach (ShippingModeInfo current in shippingModes)
            {
                base.Items.Add(new ListItem(current.Name, current.ModeId.ToString()));
            }
        }
        public override void DataBind()
        {
            this.Items.Clear();
            if (this.AllowNull)
            {
                base.Items.Add(new ListItem(this.NullToDisplay, string.Empty));
            }
            DataTable table = new DataTable();

            foreach (DataRow row in ControlProvider.Instance().GetBrandCategories().Rows)
            {
                int num = (int)row["BrandId"];
                this.Items.Add(new ListItem((string)row["BrandName"], num.ToString(CultureInfo.InvariantCulture)));
            }
        }
Exemple #13
0
        protected override void Render(HtmlTextWriter writer)
        {
            DataTable skuContentBySku = ControlProvider.Instance().GetSkuContentBySku(base.Text);
            string    str             = string.Empty;

            foreach (DataRow row in skuContentBySku.Rows)
            {
                if (!string.IsNullOrEmpty(row["AttributeName"].ToString()) && !string.IsNullOrEmpty(row["ValueStr"].ToString()))
                {
                    object obj2 = str;
                    str = string.Concat(new object[] { obj2, row["AttributeName"], ":", row["ValueStr"], "; " });
                }
            }
            base.Text = str;
            base.Render(writer);
        }
Exemple #14
0
        public override void DataBind()
        {
            base.Items.Clear();
            if (this.AllowNull)
            {
                base.Items.Add(new ListItem(this.NullToDisplay, string.Empty));
            }
            if (this.IsShowNoset)
            {
                base.Items.Add(new ListItem("未设置产品线", "0"));
            }
            IList <ProductLineInfo> productLineList = ControlProvider.Instance().GetProductLineList();

            foreach (ProductLineInfo current in productLineList)
            {
                base.Items.Add(new ListItem(Globals.HtmlDecode(current.Name), current.LineId.ToString()));
            }
        }
Exemple #15
0
 protected override void AttachChildControls()
 {
     pnlLogin          = (Panel)FindControl("pnlLogin");
     pnlLogout         = (Panel)FindControl("pnlLogout");
     litAccount        = (Literal)FindControl("litAccount");
     litMemberGrade    = (Literal)FindControl("litMemberGrade");
     litPoint          = (Literal)FindControl("litPoint");
     litNum            = (Literal)FindControl("litNum");
     pnlLogout.Visible = !HiContext.Current.User.IsAnonymous;
     pnlLogin.Visible  = HiContext.Current.User.IsAnonymous;
     if (!Page.IsPostBack && ((HiContext.Current.User.UserRole == UserRole.Member) || (HiContext.Current.User.UserRole == UserRole.Underling)))
     {
         string str;
         int    num;
         Member user = HiContext.Current.User as Member;
         litAccount.Text = Globals.FormatMoney(user.Balance);
         litPoint.Text   = user.Points.ToString();
         ControlProvider.Instance().GetMemberExpandInfo(user.GradeId, user.Username, out str, out num);
         litMemberGrade.Text = str;
         litNum.Text         = num.ToString();
     }
 }
 protected override void AttachChildControls()
 {
     this.pnlLogin          = (Panel)this.FindControl("pnlLogin");
     this.pnlLogout         = (Panel)this.FindControl("pnlLogout");
     this.litAccount        = (Literal)this.FindControl("litAccount");
     this.litMemberGrade    = (Literal)this.FindControl("litMemberGrade");
     this.litPoint          = (Literal)this.FindControl("litPoint");
     this.litNum            = (Literal)this.FindControl("litNum");
     this.pnlLogout.Visible = !HiContext.Current.User.IsAnonymous;
     this.pnlLogin.Visible  = HiContext.Current.User.IsAnonymous;
     if (!this.Page.IsPostBack && (HiContext.Current.User.UserRole == UserRole.Member || HiContext.Current.User.UserRole == UserRole.Underling))
     {
         Member member = HiContext.Current.User as Member;
         this.litAccount.Text = Globals.FormatMoney(member.Balance);
         this.litPoint.Text   = member.Points.ToString();
         string text;
         int    num;
         ControlProvider.Instance().GetMemberExpandInfo(member.GradeId, member.Username, out text, out num);
         this.litMemberGrade.Text = text;
         this.litNum.Text         = num.ToString();
     }
 }
        protected override void Render(HtmlTextWriter writer)
        {
            base.Text = "";
            DataTable tags = ControlProvider.Instance().GetTags();

            if (tags.Rows.Count < 0)
            {
                base.Text = "无";
                return;
            }
            foreach (DataRow dataRow in tags.Rows)
            {
                string text = "";
                if (this._selectvalue != null)
                {
                    foreach (int current in this._selectvalue)
                    {
                        if (current == Convert.ToInt32(dataRow["TagID"].ToString()))
                        {
                            text = "checked=\"checked\"";
                        }
                    }
                }
                string text2 = base.Text;
                base.Text = string.Concat(new string[]
                {
                    text2,
                    "<input type=\"checkbox\" onclick=\"javascript:CheckTagId(this)\" value=\"",
                    dataRow["TagID"].ToString(),
                    "\" ",
                    text,
                    "/>",
                    dataRow["TagName"].ToString(),
                    "\u3000"
                });
            }
            base.Render(writer);
        }
        public override void DataBind()
        {
            Items.Clear();
            if (AllowNull)
            {
                base.Items.Add(new ListItem(NullToDisplay, string.Empty));
            }
            DataTable brandCategoriesByTypeId = new DataTable();

            if (ProductTypeId.HasValue)
            {
                brandCategoriesByTypeId = ControlProvider.Instance().GetBrandCategoriesByTypeId(productTypeId.Value);
            }
            else
            {
                brandCategoriesByTypeId = ControlProvider.Instance().GetBrandCategories();
            }
            foreach (DataRow row in brandCategoriesByTypeId.Rows)
            {
                int num = (int)row["BrandId"];
                Items.Add(new ListItem((string)row["BrandName"], num.ToString(CultureInfo.InvariantCulture)));
            }
        }