Exemple #1
0
 protected override void OnLoad(EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.DataSource = SupplierHelper.GetSupplierAll(this.MaxNum);
         base.DataBind();
     }
 }
Exemple #2
0
        public override void DataBind()
        {
            base.Items.Clear();
            if (this.AllowNull)
            {
                base.Items.Add(new ListItem(this.NullToDisplay, string.Empty));
            }
            IList <SupplierInfo> supplierAll = SupplierHelper.GetSupplierAll(0);

            foreach (SupplierInfo item2 in supplierAll)
            {
                ListItem item = new ListItem(item2.SupplierName, item2.SupplierId.ToString());
                base.Items.Add(item);
            }
        }