本文整理汇总了C#中Address.GetCountyList方法的典型用法代码示例。如果您正苦于以下问题:C# Address.GetCountyList方法的具体用法?C# Address.GetCountyList怎么用?C# Address.GetCountyList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Address
的用法示例。
在下文中一共展示了Address.GetCountyList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildAddressDisplay
private static string BuildAddressDisplay(Address address, bool isLast)
{
var sb = new StringBuilder();
var last = (isLast) ? "last" : "";
var checkInvoice = (address.Invoice) ? " checked=\"checked\"" : "";
var postCode = (address.PostCode != null) ? address.PostCode.ToUpper() : "";
sb.Append("<div class=\"table-cell sixcol " + last + "\">" +
"<fieldset>" +
"<legend>Address</legend>" +
"<div class=\"table address\" id=\"" + address.Id + "\">" +
"<div class=\"table-row\">" +
"<div class=\"table-cell fourcol\">" +
"<label>Address 1</label>" +
"</div>" +
"<div class=\"table-cell eightcol last\">" +
"<div class=\"input\"><input type=\"text\" name=\"HouseNumber\" value=\"" + address.HouseNumber + "\" tabindex=\"2\" /></div>" +
"</div>" +
"</div>" +
"<div class=\"table-row\">" +
"<div class=\"table-cell fourcol\">" +
"<label>Address 2</label>" +
"</div>" +
"<div class=\"table-cell eightcol last\">" +
"<div class=\"input\"><input type=\"text\" name=\"Street\" value=\"" + address.Street + "\" tabindex=\"3\" /></div>" +
"</div>" +
"</div>" +
"<div class=\"table-row\">" +
"<div class=\"table-cell fourcol\">" +
"<label>Address 3</label>" +
"</div>" +
"<div class=\"table-cell eightcol last\">" +
"<div class=\"input\"><input type=\"text\" name=\"Area\" value=\"" + address.Area + "\" tabindex=\"4\" /></div>" +
"</div>" +
"</div>" +
"<div class=\"table-row\">" +
"<div class=\"table-cell fourcol\">" +
"<label>Town/City</label>" +
"</div>" +
"<div class=\"table-cell eightcol last\">" +
"<div class=\"input\"><input type=\"text\" name=\"Town\" value=\"" + address.Town + "\" tabindex=\"5\" /></div>" +
"</div>" +
"</div>" +
"<div class=\"table-row\">" +
"<div class=\"table-cell fourcol\">" +
"<label>County</label>" +
"</div>" +
"<div class=\"table-cell eightcol last\">" +
DisplayCountyDropDown(address.GetCountyList(), address.County, 6) +
"</div>" +
"</div>" +
"<div class=\"table-row\">" +
"<div class=\"table-cell fourcol\">" +
"<label>Post Code</label>" +
"</div>" +
"<div class=\"table-cell eightcol last\">" +
"<div class=\"input\"><input type=\"text\" name=\"PostCode\" id=\"PostCode\" value=\"" + postCode + "\" tabindex=\"7\" /></div>" +
"</div>" +
"</div>" +
"<div class=\"table-row\">" +
"<div class=\"table-cell fourcol\">" +
"<label>Invoice address</label>" +
"</div>" +
"<div class=\"table-cell eightcol last\">" +
"<div class=\"radio\"><input type=\"checkbox\" name=\"Invoice\" id=\"Invoice\"" + checkInvoice + " tabindex=\"8\" /></div>" +
"</div>" +
"</div>" +
"</div>" +
"<div class=\"no-border\">" +
"<button class=\"btnAddAddress\">Add more</button>" +
"<button class=\"removeAddress\" data-id=\"" + address.Id + "\">Remove</button>" +
"</div>" +
"</fieldset>" +
"</div>");
return sb.ToString();
}