protected void Page_Init(object sender, EventArgs e) { _OrderId = AbleCommerce.Code.PageHelper.GetOrderId(); _Order = OrderDataSource.Load(_OrderId); if (_Order == null) { Response.Redirect("Default.aspx"); } string suffix = "?OrderNumber=" + _Order.OrderNumber; AddProductLink.NavigateUrl += suffix; AddOtherItemLink.NavigateUrl += suffix; RecalculateTaxesButton.Visible = TaxHelper.IsATaxProviderEnabled(); BindGrids(); TaxExemptionMessagePanel.Visible = !string.IsNullOrEmpty(this._Order.TaxExemptionReference); if (TaxExemptionMessagePanel.Visible) { TaxExemptionMessage.Text = string.Format(TaxExemptionMessage.Text, this._Order.TaxExemptionReference); } // WE DON'T SUPPORT TAX CLOUD TAX RECALCULATION TaxGateway taxGateway = null; TaxCloudProvider taxProvider = null; int taxGatewayId = TaxGatewayDataSource.GetTaxGatewayIdByClassId(Misc.GetClassId(typeof(TaxCloudProvider))); if (taxGatewayId > 0) { taxGateway = TaxGatewayDataSource.Load(taxGatewayId); } if (taxGateway != null) { taxProvider = taxGateway.GetProviderInstance() as TaxCloudProvider; } if (taxProvider != null && taxProvider.EnableTaxCloud) { TaxCloudWarningMessagePanel.Visible = true; TaxCloudReclaculationMessage.Text = string.Format(TaxCloudReclaculationMessage.Text, _Order.OrderNumber); } }