protected void Page_Load(object sender, EventArgs e) { //if (Request.IsAuthenticated) //{ // Response.Redirect("~/Default.aspx"); //} if (Request.QueryString["zip"] != null) { DataTable Dataset = LocationDB.FindAtmByZip(Request.QueryString["zip"]); if (Dataset.Rows.Count != 0) { FillTableWithData(Dataset); return; } else { NoLocationFound(); } } }
protected void ATMButton_Click(object sender, EventArgs e) { if (!ATMZipTextBox.Text.Equals("")) { DataTable Dataset = LocationDB.FindAtmByZip(ATMZipTextBox.Text); if (Dataset.Rows.Count != 0) { FillTableWithData(Dataset); return; } } else { DataTable Dataset = LocationDB.FindAtmLocationByAddress(ATMAddressTextBox.Text, ATMCityTextBox.Text, ATMStateDropDownList.SelectedValue); if (Dataset.Rows.Count != 0) { FillTableWithData(Dataset); return; } } NoLocationFound(); }