コード例 #1
0
        protected void Page_Init(object sender, System.EventArgs e)
        {
            _ShipMethodId = AlwaysConvert.ToInt(Request.QueryString["ShipMethodId"]);
            _ShipMethod   = ShipMethodDataSource.Load(_ShipMethodId);
            if (_ShipMethod == null)
            {
                RedirectMe();
            }
            //BIND TAX CODES
            IList <TaxCode> taxCodes = AbleContext.Current.Store.TaxCodes;

            TaxCode.DataSource = taxCodes;
            TaxCode.DataBind();
            ListItem item = TaxCode.Items.FindByValue(_ShipMethod.TaxCodeId.ToString());

            if (item != null)
            {
                TaxCode.SelectedIndex = TaxCode.Items.IndexOf(item);
            }

            SurchargeTaxCode.DataSource = taxCodes;
            SurchargeTaxCode.DataBind();
            item = SurchargeTaxCode.Items.FindByValue(_ShipMethod.SurchargeTaxCodeId.ToString());
            if (item != null)
            {
                SurchargeTaxCode.SelectedIndex = SurchargeTaxCode.Items.IndexOf(item);
            }
        }
コード例 #2
0
 protected void Page_Init(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         AbleCommerce.Code.PageHelper.SetPickImageButton(ThumbnailUrl, BrowseThumbnailUrl);
         AbleCommerce.Code.PageHelper.SetPickImageButton(ImageUrl, BrowseImageUrl);
         //BIND TAXES
         TaxCode.DataSource = TaxCodeDataSource.LoadAll();
         TaxCode.DataBind();
     }
 }
コード例 #3
0
        protected void Page_Init()
        {
            IList <TaxCode> taxCodes = TaxCodeDataSource.LoadAll();

            TaxCodes.DataSource = taxCodes;
            TaxCodes.DataBind();
            TaxCode.Items.Clear();
            TaxCode.Items.Add("");
            TaxCode.DataSource = taxCodes;
            TaxCode.DataBind();
            ZoneList.DataSource = ShipZoneDataSource.LoadAll("Name");
            ZoneList.DataBind();
            GroupList.DataSource = GroupDataSource.LoadAll("Name");
            GroupList.DataBind();

            // ROUNDING RULE
            RoundingRule.Items.Clear();
            RoundingRule.Items.Add(new ListItem("Common Method", ((int)CommerceBuilder.Taxes.RoundingRule.Common).ToString()));
            RoundingRule.Items.Add(new ListItem("Round to Even", ((int)CommerceBuilder.Taxes.RoundingRule.RoundToEven).ToString()));
            RoundingRule.Items.Add(new ListItem("Always Round Up", ((int)CommerceBuilder.Taxes.RoundingRule.AlwaysRoundUp).ToString()));
        }