private void BindWareHouseAddress(AspxCommerce.Core.WareHouseAddress wareHouseAddress) { if (wareHouseAddress != null) { StringBuilder billingAdr = new StringBuilder(); billingAdr.Append("<table><tr>"); billingAdr.Append("<td>"+getLocale("WareHouse Name:")+"</td>"); billingAdr.Append("<td>" + wareHouseAddress.Name + "</td></tr><tr>"); billingAdr.Append("<td>"+getLocale("Address:")+"</td>"); billingAdr.Append("<td>" + wareHouseAddress.Address + "</td></tr><tr>"); if (!string.IsNullOrEmpty(wareHouseAddress.StreetAddress1)) { billingAdr.Append("<td>"+getLocale("Street Address1:")+"</td>"); billingAdr.Append("<td>" + wareHouseAddress.StreetAddress1 + "</td></tr><tr>"); } if (!string.IsNullOrEmpty(wareHouseAddress.StreetAddress2)) { billingAdr.Append("<td>"+getLocale("Street Address2:")+"</td>"); billingAdr.Append("<td>" + wareHouseAddress.StreetAddress2 + "</td></tr><tr>"); } billingAdr.Append("<td>"+getLocale("Country:")+"</td>"); billingAdr.Append("<td>" + wareHouseAddress.Country + "</td></tr><tr>"); billingAdr.Append("<td>"+getLocale("City:")+"</td>"); billingAdr.Append("<td>" + wareHouseAddress.City + "</td></tr><tr>"); billingAdr.Append("<td>"+getLocale("State:")+"</td>"); billingAdr.Append("<td>" + wareHouseAddress.State + "</td></tr><tr>"); billingAdr.Append("<td>"+getLocale("ZipCode:")+"</td>"); billingAdr.Append("<td>" + wareHouseAddress.PostalCode + "</td></tr><tr>"); billingAdr.Append("<td>"+getLocale("Email Address:")+"</td>"); billingAdr.Append("<td>" + wareHouseAddress.Email + "</td></tr><tr>"); billingAdr.Append("<td>"+getLocale("Phone No:")+"</td>"); billingAdr.Append("<td>" + wareHouseAddress.Phone + "</td></tr>"); billingAdr.Append("</table>"); ltWareHouse.Text = billingAdr.ToString(); btnCreateLabel.Enabled = true; } else { Exception ex = new Exception("Please add warehouse address before shipping!"); ShowError(ex); ltWareHouse.Text = "<span>No WareHouse Address!</span>"; btnCreateLabel.Enabled = false; } }
private void BindWareHouseAddress(AspxCommerce.Core.WareHouseAddress wareHouseAddress) { StringBuilder billingAdr = new StringBuilder(); billingAdr.Append("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr>"); billingAdr.Append("<td>WareHouse Name:</td>"); billingAdr.Append("<td>" + wareHouseAddress.Name + "</td></tr><tr>"); billingAdr.Append("<td>Address:</td>"); billingAdr.Append("<td>" + wareHouseAddress.Address + "</td></tr><tr>"); if (!string.IsNullOrEmpty(wareHouseAddress.StreetAddress1)) { billingAdr.Append("<td>Street Address1:</td>"); billingAdr.Append("<td>" + wareHouseAddress.StreetAddress1 + "</td></tr><tr>"); } if (!string.IsNullOrEmpty(wareHouseAddress.StreetAddress2)) { billingAdr.Append("<td>Street Address2:</td>"); billingAdr.Append("<td>" + wareHouseAddress.StreetAddress2 + "</td></tr><tr>"); } billingAdr.Append("<td>Country:</td>"); billingAdr.Append("<td>" + wareHouseAddress.Country + "</td></tr><tr>"); billingAdr.Append("<td>City:</td>"); billingAdr.Append("<td>" + wareHouseAddress.City + "</td></tr><tr>"); billingAdr.Append("<td>State:</td>"); billingAdr.Append("<td>" + wareHouseAddress.State + "</td></tr><tr>"); billingAdr.Append("<td>ZipCode:</td>"); billingAdr.Append("<td>" + wareHouseAddress.PostalCode + "</td></tr><tr>"); billingAdr.Append("<td>Email Address:</td>"); billingAdr.Append("<td>" + wareHouseAddress.Email + "</td></tr><tr>"); billingAdr.Append("<td>Phone No:</td>"); billingAdr.Append("<td>" + wareHouseAddress.Phone + "</td></tr>"); billingAdr.Append("</table>"); ltWareHouse.Text = billingAdr.ToString(); }