//Methods #region Page_Load protected void Page_Load(Object sender, EventArgs e) { try { if (!this.IsPostBack) { this.DhlProductCodeList.Items.AddRange( DhlZone.LoadAll() .Select(runner => new ListItem(runner.Name, ((int)runner.Key).ToString())) .ToArray()); } } catch (Exception ex) { this.Master.ShowError(ex); } }
protected void MailingCostRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { var ee = new MailingCostRepeaterItemEventArgs(e); if (ee.Data != null) { ee.EditLink.NavigateUrl = PageUrlAttribute.Get <MailingCosts.Edit>(new MailingCosts.Edit.Query() { MailingCostCountry = ee.Data }); ee.NameLiteral.Text = ee.Data.Name; ee.Iso2Literal.Text = ee.Data.IsoCode2; ee.Iso3Literal.Text = ee.Data.IsoCode3; ee.DpdCostsUnto4kgLiteral.Text = ee.Data.DpdCostsUnto4kg.ToString("C"); ee.DpdCostsUnto31_5kgLiteral.Text = ee.Data.DpdCostsUnto31_5kg.ToString("C"); ee.DhlCostsLiteral.Text = ee.Data.DhlCosts.ToString("C"); ee.DhlProductCodeLiteral.Text = DhlZone.LoadSingle(ee.Data.DhlProductCode)?.Name ?? "???"; ee.HideNetPriceCheckBox.Checked = ee.Data.HideNetPrices; } }