当前位置: 首页>>代码示例>>C#>>正文


C# Address.GetCountyList方法代码示例

本文整理汇总了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();
        }
开发者ID:r3plica,项目名称:Boomerang,代码行数:77,代码来源:AddressProvider.cs


注:本文中的Address.GetCountyList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。