Created
February 3, 2016 19:18
-
-
Save esmyth01/0d953ea4cb8b0bc64d02 to your computer and use it in GitHub Desktop.
Assignment 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
<link href="styles.css" rel="stylesheet" type="text/css" /> | |
</head> | |
<body> | |
<form id="form1" runat="server"> | |
<div> | |
<asp:GridView ID="GridViewArtists" runat="server"></asp:GridView> | |
<asp:GridView ID="GridViewShows" runat="server"></asp:GridView> | |
<asp:GridView ID="GridViewVenues" runat="server"></asp:GridView> | |
<div id="chooseArtist"> <h3>Choose an Artist!</h3> | |
<asp:DropDownList ID="DropDownListArtists" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"></asp:DropDownList> | |
<asp:GridView ID="GridViewListArtists" runat="server"></asp:GridView></div> | |
<div id="chooseVenue"><h3>Choose a Venue!</h3> | |
<asp:DropDownList ID="DropDownListVenues" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged"></asp:DropDownList> | |
<asp:GridView ID="GridViewListVenues" runat="server"></asp:GridView></div> | |
</div> | |
</form> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
public partial class _Default : System.Web.UI.Page | |
{ | |
ShowTrackerReference.ShowTrackerServiceClient db = new ShowTrackerReference.ShowTrackerServiceClient(); | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
if (!IsPostBack) | |
{ | |
LoadDropDownVenues(); | |
LoadDropDownArtists(); | |
ArtistsGrid(); | |
ShowGrid(); | |
VenueGrid(); | |
} | |
} | |
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) | |
{ | |
FillGridArtists(); | |
} | |
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e) | |
{ | |
FillGridVenues(); | |
} | |
protected void ArtistsGrid() | |
{ | |
string[] artists = db.GetArtists(); | |
GridViewArtists.DataSource = artists; | |
GridViewArtists.DataBind(); | |
} | |
protected void ShowGrid() | |
{ | |
string[] shows = db.GetShows(); | |
GridViewShows.DataSource = shows; | |
GridViewShows.DataBind(); | |
} | |
protected void VenueGrid() | |
{ | |
string[] venues = db.GetVenues(); | |
GridViewVenues.DataSource = venues; | |
GridViewVenues.DataBind(); | |
} | |
protected void LoadDropDownArtists() | |
{ | |
string[] artists = db.GetArtists(); | |
DropDownListArtists.DataSource = artists; | |
DropDownListArtists.DataBind(); | |
} | |
protected void FillGridArtists() | |
{ | |
string artist = DropDownListArtists.SelectedItem.Text; | |
ShowTrackerReference.ShowLite[] artsy = db.ShowDetails(artist); | |
GridViewListArtists.DataSource = artsy; | |
GridViewListArtists.DataBind(); | |
} | |
protected void LoadDropDownVenues() | |
{ | |
string[] venues = db.GetVenues(); | |
DropDownListVenues.DataSource = venues; | |
DropDownListVenues.DataBind(); | |
} | |
protected void FillGridVenues() | |
{ | |
string venue = DropDownListVenues.SelectedItem.Text; | |
ShowTrackerReference.ShowLite[] ven = db.VenueDetails(venue); | |
GridViewListVenues.DataSource = ven; | |
GridViewListVenues.DataBind(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*{ | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
} | |
table { | |
float: left; | |
margin: 20px; | |
} | |
#chooseVenue, #chooseArtist { | |
float: left; | |
clear: both; | |
margin-top: 20px; | |
} | |
h3 { | |
margin-bottom: 10px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment