/// <summary> /// This method runs as the page is loaded. The donation information that is displayed is based on the /// query string "eventID". /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// Aaron Copeland - 11/27/2012 /// Tested by Aaron Copeland - 11/28/2012 protected void Page_Load(object sender, EventArgs e) { try { if (Request["eventID"] == null) // Go to events main page { Response.Redirect("Events.aspx", false); } else { String eventID = Request.QueryString["eventID"]; BusinessTier bt = new BusinessTier(); // get the details for the Donation Event DataSet ds = bt.getDonationDetails(eventID); if (ds.Tables[0].Rows.Count > 0) { String errorString = "Please fix the following items:</br>"; // Iterate through errors for (int i = 0; i < ds.Tables[0].Rows.Count; i++) errorString += ds.Tables[0].Rows[i][1] + "<br/>"; lblError.Text = errorString; PresentationHelpers.FocusControlOnPageLoad(lblError.ClientID, this.Page); } // populate the page with the recipients info recipientImage.Attributes.Add("src", ds.Tables[1].Rows[0][6].ToString()); lblEventTitle.Text = ds.Tables[1].Rows[0][2].ToString(); lblEventDescription.Text = ds.Tables[1].Rows[0][3].ToString(); lblEventDetails.Text = ds.Tables[1].Rows[0][4].ToString(); hdnReciepantsID.Value = ds.Tables[1].Rows[0][1].ToString(); } } catch (Exception ex) { ErrorLog.logError(ex); Response.Redirect("Oops.aspx"); } }