protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int MemberNumber = 0; try { MemberNumber = int.Parse(Session["MemberNumber"].ToString()); } catch (Exception) { Response.Redirect("~/Logpn.aspx"); } } ClubBAISTRequestDirector CBRD = new ClubBAISTRequestDirector(); List <Application> Applications = CBRD.GetApplications(); foreach (Application item in Applications) { TableRow Row = new TableRow(); TableCell Cell = new TableCell(); Cell.Text = item.ApplicationID.ToString(); Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.LastName; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.FirstName; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.Address; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.PostalCode; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.Phone; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.AltPhone; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.Email; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.BirthDate.ToShortDateString(); Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.Occupation; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.CompanyName; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.CompanyAddress; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.CompanyPostalCode; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.CompanyPhone; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.SubmitDate.ToShortDateString(); Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.Sex.ToString(); Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.WantsShare ? "Yes" : "No"; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.Waitlisted ? "Yes" : "No"; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.Onhold ? "Yes" : "No"; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.ShareholderName1; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.ShareholderDate1.ToShortDateString(); Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.ShareholderName2; Row.Cells.Add(Cell); Cell = new TableCell(); Cell.Text = item.ShareholderDate2.ToShortDateString(); Row.Cells.Add(Cell); ApplicationsTable.Rows.Add(Row); } }