protected void GetCity() { if (VerifyUtility.IsNumber_NotNull(Request["City_Country"])) City_Country = Convert.ToInt32(Request["City_Country"]); if (VerifyUtility.IsString_NotNull(Request["City_TextBox"])) City_TextBox = Request["City_TextBox"]; BLL.City b_City = new BLL.City(); Entity.City[] e_City = b_City.Select_City(City_Country); string Charter = ""; if (e_City != null) { foreach (Entity.City o_City in e_City) { if (o_City.City_Name.Substring(0, 1) != Charter) { Charter = o_City.City_Name.Substring(0, 1); o_CityList.Append("<a name=\"" + Charter + "\"></a><br/>"); o_CityList.Append("<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">"); o_CityList.Append("<tr><td><b>" + Charter + "</b></td>"); o_CityList.Append("<td align=\"right\"><a href=\"#TOP\">Top</a> | <a href=\"#\" onclick=\"window.close();return false;\">Close</a></td>"); o_CityList.Append("</tr>"); o_CityList.Append("</table><br/>"); } o_CityList.Append("<a href=\"#\" onclick=\"SetCity('" + o_City.City_Name + "');return false;\" class=\"AdminToolsLink1\">" + o_City.City_Name + "</a><br/>"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (VerifyUtility.IsString_NotNull(Request["City_Name_Title"])) { Response.ContentType = "text/xml"; g_City_Name_Title = Request["City_Name_Title"]; if (g_City_Name_Title.Length == 3) { BLL.City b_City = new BLL.City(); b_City.Select_CityTitle(g_City_Name_Title, Response); } else { BLL.City b_City = new BLL.City(); b_City.Select_CityName(g_City_Name_Title, Response); } } } }
protected void Page_Load(object sender, EventArgs e) { Ncu.jsj.BLL.City bll = new BLL.City(); GridView1.DataSource = bll.GetAllList(); GridView1.DataBind(); }