protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //Populate the Department Query string...RCM..6/28/11 Department = Request.QueryString["Dept"]; //Ryan C Manners...6/16/11. UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //Populate the Department Query string...RCM..6/28/11 Department = Request.QueryString["Dept"]; //Ryan C Manners...6/16/11. UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); if (Request.QueryString["security"] == "Good") { //lblProgram.Visible = false; //cmbProgram.Visible = false; //ddlProgram.Enabled = false; //ddlProgram.Visible = false; ddlTime.Items.Add("Select a time."); ddlTime.Items.Add("4:30-6:00 Class"); ddlTime.Items.Add("6:30-8:00 Class"); ddlTime.Text = "Select a time."; con.Open();//Opens the db connection. string sql_LoadGrid = ""; sql_LoadGrid = "select classname as 'Name', meettime as 'Time', meetday as 'Day', location as 'Location', sizelimit as 'SizeLimit', comments as 'Comments', instructor as 'Instructor', devotionalleader as 'DevotionalLeader', id as 'id' " + "FROM PerformingArtsAcademyAvailableClasses order by classname"; SqlDataAdapter da = new SqlDataAdapter(sql_LoadGrid, con); DataSet ds = new DataSet(); da.Fill(ds, "PerformingArtsAcademyAvailableClasses"); gvStudentList.DataSource = ds.Tables[0]; gvStudentList.DataBind(); con.Close(); //ddlProgram.Items.Add("Childrens Choir"); //ddlProgram.Items.Add("MSHS Choir"); //ddlProgram.Items.Add("PerformingArtsAcademy"); //ddlProgram.Text = "PerformingArtsAcademy"; } else { //Ryan C Manners..1/5/11 //Do NOT ALLOW ACCESS TO THE PAGE! Response.Redirect("ErrorAccess.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //Populate the Department Query string...RCM..6/28/11 Department = Request.QueryString["Dept"]; //Ryan C Manners...6/16/11. UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); //Check for a login... If not, re-direct them to the mainmenu page..RCM.. if (Request.QueryString["security"] == "Good") { if (((Request.QueryString["LastName"] == "VanKirk") && (Request.QueryString["FirstName"] == "Sara")) || ((Request.QueryString["LastName"] == "Wagner") && (Request.QueryString["FirstName"] == "Amanda")) || ((Request.QueryString["LastName"] == "Manners") && (Request.QueryString["FirstName"] == "Ryan")) || ((Request.QueryString["LastName"] == "Glover") && (Request.QueryString["FirstName"] == "Tammy")) || ((Request.QueryString["LastName"] == "Kreider") && (Request.QueryString["FirstName"] == "Tom")) || ((Request.QueryString["LastName"] == "Reichart") && (Request.QueryString["FirstName"] == "Seth")) || ((Request.QueryString["LastName"] == "Krance") && (Request.QueryString["FirstName"] == "Tom")) || ((Request.QueryString["LastName"] == "Lapalme") && (Request.QueryString["FirstName"] == "Brittany"))) { if ((Request.QueryString["StudentLastName"] == "") && (Request.QueryString["StudentFirstName"] == "")) { PopulateDropDown(); ddlOptions.Items.Add("Please select a student"); ddlOptions.Text = "Please select a student"; } else { DisplayHeaderFields(); RetrieveInformation(); PopulateDropDown(); DisplayTheGrid(); ddlOptions.Items.Add(Request.QueryString["StudentLastName"] + "," + Request.QueryString["StudentFirstName"]); ddlOptions.Text = Request.QueryString["StudentLastName"] + "," + Request.QueryString["StudentFirstName"]; lblNotes.Visible = true; lbAddNewEntry.Visible = true; cmbUpdate.Enabled = true; } } else { Response.Redirect("ErrorAccess.aspx?Security=Good&lastname=" + Request.QueryString["lastname"] + "&firstname=" + Request.QueryString["firstname"] + "&Dept=" + Request.QueryString["Dept"]); } } else { //Ryan C Manners..1/5/11 //Do NOT ALLOW ACCESS TO THE PAGE! Response.Redirect("ErrorAccess.aspx?Security=Good&lastname=" + Request.QueryString["lastname"] + "&firstname=" + Request.QueryString["firstname"] + "&Dept=" + Request.QueryString["Dept"]); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //Populate the Department Query string...RCM..6/28/11 Department = Request.QueryString["Dept"]; //Ryan C Manners...6/16/11. UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); if (Request.QueryString["security"] == "Good") { ddlReports.Items.Add("Please select a report"); ddlReports.Items.Add("Student's Per Program"); ddlReports.Items.Add("Student's Per Program/ProgramSeason"); ddlReports.Items.Add("Student's Per Program/Section"); ddlReports.Items.Add("Student's Per Program/Section/TeamName"); ddlReports.Items.Add("Volunteer's Per Program"); ddlReports.Items.Add("Volunteer's Per Program/ProgramSeason"); ddlReports.Items.Add("Volunteer's Per Program/Section"); ddlReports.Items.Add("Volunteer's Per Program/Section/TeamName"); ddlReports.Items.Add("Volunteers Meals/Hours Per Program/Section"); ddlReports.Items.Add("Volunteers Meals/Hours Per Program"); ddlReports.Items.Add("Student/Gospel Meal Program/Section"); ddlReports.Items.Add("Student/Gospel Meal Program"); ddlReports.Items.Add("Student/Gospel Meal ProgramSeason"); ddlReports.Items.Add("Student/Gospel Meal Count"); ddlReports.Items.Add("Shakes View Student/Gospel Meal Program"); ddlReports.Items.Add("Distinct Student Total"); ddlReports.Text = "Please select a report"; ddlProgramSeason.Items.Add("Select a Program Year/Season"); ddlProgramSeason.Items.Add("Year-2012-2013"); //ddlProgramSeason.Items.Add("Year-2011-2012"); //ddlProgramSeason.Items.Add("Year-2010-2011"); //RetrieveProgramSeasonsAndAddToList(); ddlReports.Text = "Select a Program Year/Season"; } else { //Ryan C Manners..1/5/11 //Do NOT ALLOW ACCESS TO THE PAGE! Response.Redirect("ErrorAccess.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //Populate the Department Query string...RCM..6/28/11 Department = Request.QueryString["Dept"]; //Ryan C Manners...6/16/11. UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); if ((Department == "Education") || ((Request.QueryString["LastName"] == "Manners"))) { } else { Response.Redirect("ErrorAccess.aspx?Security=Good&lastname=" + Request.QueryString["lastname"] + "&firstname=" + Request.QueryString["firstname"] + "&Dept=" + Request.QueryString["Dept"]); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //Populate the Department Query string...RCM..6/28/11 Department = Request.QueryString["Dept"]; //Ryan C Manners...6/16/11. UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); try { con.Open(); gvBillboardInformation.Enabled = true; gvBillboardInformation.Visible = true; string sql_LoadGrid = ""; sql_LoadGrid = "select si.LastName, si.FirstName, si.dob " + "from UIF_PerformingArts.dbo.studentinformation si " + "LEFT OUTER JOIN UIF_PerformingArts.dbo.programslist pl " + "ON (si.lastname = pl.lastname AND si.firstname = pl.firstname) " + "WHERE ((si.dob like '" + System.DateTime.Now.ToString("MM") + "/%') OR (si.dob like '" + System.DateTime.Now.ToString("MM") + "-%'))" + "AND (pl.mshschoir = 1 or pl.childrenschoir = 1 or pl.performingarts = 1 or pl.shakes = 1 or pl.singers = 1) " //+ "AND si.currentregistrationform = 1 " + "AND si.dob > '" + System.DateTime.Now.ToString("MM-dd-YYYY") + "' " + "GROUP BY si.lastname, si.firstname, si.dob " + "order by si.dob "; SqlDataAdapter da = new SqlDataAdapter(sql_LoadGrid, con); DataSet ds = new DataSet(); da.Fill(ds, "UIF_PerformingArts.dbo.studentinformation"); gvBillboardInformation.DataSource = ds.Tables[0]; gvBillboardInformation.DataBind(); con.Close(); } catch (Exception lkjl) { } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //Populate the Department Query string...RCM..6/28/11 Department = Request.QueryString["Dept"]; //Ryan C Manners...6/16/11. UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); if (Request.QueryString["security"] == "Good") { if (((Request.QueryString["LastName"] == "Manners") && (Request.QueryString["FirstName"] == "Ryan"))) { //Full-Control. //if (ReadOnly()) //{ //Make this page, READ ONLY access!...for sections... level 2, READ ONLY!!! // lbAddNewEntry.Enabled = false; // gvStudentList.Enabled = false; //} DisplayTheGrid(); } else { Response.Redirect("ErrorAccess.aspx?Security=Good&lastname=" + Request.QueryString["lastname"] + "&firstname=" + Request.QueryString["firstname"] + "&Dept=" + Request.QueryString["Dept"]); } } else { //Ryan C Manners..1/5/11 //Do NOT ALLOW ACCESS TO THE PAGE! Response.Redirect("ErrorAccess.aspx?Security=Good&lastname=" + Request.QueryString["lastname"] + "&firstname=" + Request.QueryString["firstname"] + "&Dept=" + Request.QueryString["Dept"]); } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["security"] == "Good") { if (!Page.IsPostBack) { //Ryan C Manners...6/16/11. UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); //Retrieve the class lists con.Open(); try { string sql_LoadGrid = "select * from systemenhancements order by degreeofimportance desc "; SqlDataAdapter da = new SqlDataAdapter(sql_LoadGrid, con); DataSet ds = new DataSet(); da.Fill(ds, "systemenhancements"); gvSystemEnhancements.DataSource = ds.Tables[0]; gvSystemEnhancements.DataBind(); con.Close(); } catch (Exception lkjl_) { string lkjl = ""; } } } else { //Ryan C Manners..1/5/11 //Do NOT ALLOW ACCESS TO THE PAGE! Response.Redirect("ErrorAccess.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); }
protected void Page_Load(object sender, EventArgs e) { Boolean FoundRecord1 = false; Boolean FoundRecord2 = false; if (!Page.IsPostBack) { //Populate the Department Query string...RCM..6/28/11 Department = Request.QueryString["Dept"]; //Ryan C Manners...6/16/11. UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); if (Request.QueryString["security"] == "Good") { try { con.Open();//Opens the db connection. cmbNewEnrollment.Enabled = false; cmbNewEnrollment2.Enabled = false; cmdUpdate.Enabled = false; try { string sql7 = "select pictureidentification FROM volunteerinformation WHERE lastname = '" + Request.QueryString["VolunteerLastName"] + "' and firstname = '" + Request.QueryString["VolunteerFirstName"] + "' "; SqlCommand cmd7 = new SqlCommand(sql7, con); cmd7.CommandTimeout = 120000;//Connection Timeout 2 minutes. SqlDataAdapter custDA7 = new SqlDataAdapter(); custDA7.SelectCommand = cmd7; DataSet custDS7 = new DataSet(); custDA7.Fill(custDS7, "VolunteerInformation"); //Iterate over setup records and call method to do the work on each one...RCM.. foreach (DataRow myDataRowPO7 in custDS7.Tables["VolunteerInformation"].Rows) { imgStudent.ImageUrl = myDataRowPO7[0].ToString(); } } catch (Exception lkjlaaffb) { } string sql = "select StudentLastName, StudentFirstName, ClassName, MeetTime, MeetDay, Location, PaidForClass, " + "Active, Comments, Instructor, DevotionalLeader, SysCreate, sysupdate, ID, lastupdatedby " + "from PerformingArtsAcademyClassEnrollment " + "where StudentLastName = '" + Request.QueryString["VolunteerLastName"] + "' " + "and StudentFirstName = '" + Request.QueryString["VolunteerFirstName"] + "' " + "and MeetTime = '4:30-6:00 Class' " + "and volunteer = 1 " + "ORDER BY MeetTime "; SqlCommand cmd = new SqlCommand(sql, con); cmd.CommandTimeout = 120000;//Connection Timeout 2 minutes. SqlDataAdapter custDA = new SqlDataAdapter(); custDA.SelectCommand = cmd; DataSet custDS = new DataSet(); custDA.Fill(custDS, "PerformingArtsAcademyClassEnrollment"); //ddlClass1.Items.Add(" "); //Iterate over setup records and call method to do the work on each one...RCM.. foreach (DataRow myDataRowPO in custDS.Tables["PerformingArtsAcademyClassEnrollment"].Rows) { //Adding options to the drop downs for a new entry. //ddlClassSelection.Items.Add(myDataRowPO[0].ToString()); ddlClass1.Items.Add(myDataRowPO[2].ToString()); //readerList1.GetString(2)); Label1.Text = myDataRowPO[3].ToString(); lblClass1MeetDay.Text = myDataRowPO[4].ToString(); lblClass1MeetLocation.Text = myDataRowPO[5].ToString(); chbPaidClass1.Checked = System.Convert.ToBoolean(myDataRowPO[6]); //chbActive.Checked = readerList1.GetBoolean(7); txbComments.Text = myDataRowPO[8].ToString(); //Instructor readerList1.GetString(9); //DevotionalLeader = readerList1.GetString(10); if (myDataRowPO[14].ToString() == "") { lblLastUpdatedBy.Text = "N/A"; } else { lblLastUpdatedBy.Text = "LastUpdatedBy: " + myDataRowPO[14].ToString() + " On: " + myDataRowPO[12].ToString(); } //cmdUpdate.Enabled = false; chbClass1.Checked = true; ddlClass1.Enabled = false; cmdUpdate.Enabled = true; chbPaidClass1.Enabled = false; FoundRecord1 = true; cmbNewEnrollment.Enabled = true; cmbNewEnrollment.Text = "Remove from Class1"; } custDS.Clear(); string sql2 = "select ClassName, MeetTime, MeetDay, Location, Comments, Instructor, DevotionalLeader " + "from PerformingArtsAcademyAvailableClasses " + "where MeetTime = '4:30-6:00 Class' " + "group by ClassName, MeetTime, MeetDay, Location, Comments, Instructor, DevotionalLeader " + "order by ClassName"; SqlCommand cmd2 = new SqlCommand(sql2, con); cmd2.CommandTimeout = 120000;//Connection Timeout 2 minutes. SqlDataAdapter custDA2 = new SqlDataAdapter(); custDA2.SelectCommand = cmd2; DataSet custDS2 = new DataSet(); custDA2.Fill(custDS2, "PerformingArtsAcademyAvailableClasses"); if (FoundRecord1 == false) { ddlClass1.Items.Add("Select a class."); ddlClass1.Text = "Select a class."; } //Iterate over setup records and call method to do the work on each one...RCM.. foreach (DataRow myDataRowPO in custDS2.Tables["PerformingArtsAcademyAvailableClasses"].Rows) { //Adding options to the drop downs for a new entry. //if Empty then create blank. ddlClass1.Items.Add(myDataRowPO[0].ToString()); } //ddlClass1.Items.Add(" ");//RCM..2/9/11. custDS2.Clear(); //Handle dropdown list2..RCM..1/28/11. string sql3 = "select StudentLastName, StudentFirstName, ClassName, MeetTime, MeetDay, Location, PaidForClass, " + "Active, Comments, Instructor, DevotionalLeader, SysCreate, sysupdate, ID, lastupdatedby " + "from PerformingArtsAcademyClassEnrollment " + "where StudentLastName = '" + Request.QueryString["VolunteerLastName"] + "' " + "and StudentFirstName = '" + Request.QueryString["VolunteerFirstName"] + "' " + "and MeetTime = '6:30-8:00 Class' " + "and volunteer = 1 " + "ORDER BY MeetTime "; SqlCommand cmd3 = new SqlCommand(sql3, con); cmd3.CommandTimeout = 120000;//Connection Timeout 2 minutes. SqlDataAdapter custDA3 = new SqlDataAdapter(); custDA3.SelectCommand = cmd3; DataSet custDS3 = new DataSet(); custDA3.Fill(custDS3, "PerformingArtsAcademyClassEnrollment"); //ddlClass2.Items.Add(" "); //Iterate over setup records and call method to do the work on each one...RCM.. foreach (DataRow myDataRowPO in custDS3.Tables["PerformingArtsAcademyClassEnrollment"].Rows) { //Adding options to the drop downs for a new entry. //ddlClassSelection.Items.Add(myDataRowPO[0].ToString()); ddlClass2.Items.Add(myDataRowPO[2].ToString()); //readerList1.GetString(2)); Label2.Text = myDataRowPO[3].ToString(); lblClass2MeetDay.Text = myDataRowPO[4].ToString(); lblClass2MeetLocation.Text = myDataRowPO[5].ToString(); chbPaidClass2.Checked = System.Convert.ToBoolean(myDataRowPO[6]); //chbActive.Checked = readerList1.GetBoolean(7); txbComments.Text = myDataRowPO[8].ToString(); //Instructor readerList1.GetString(9); //DevotionalLeader = readerList1.GetString(10); if (myDataRowPO[14].ToString() == "") { lblLastUpdatedBy.Text = "N/A"; } else { lblLastUpdatedBy.Text = "LastUpdatedBy: " + myDataRowPO[14].ToString() + " On: " + myDataRowPO[12].ToString(); } //cmdUpdate.Enabled = false; FoundRecord2 = true; chbPaidClass2.Enabled = false; ddlClass2.Enabled = false; chbClass2.Checked = true; cmdUpdate.Enabled = true; cmbNewEnrollment2.Enabled = true; cmbNewEnrollment2.Text = "Remove from Class2"; } custDS3.Clear(); string sql4 = "select ClassName, MeetTime, MeetDay, Location, Comments, Instructor, DevotionalLeader " + "from PerformingArtsAcademyAvailableClasses " + "where MeetTime = '6:30-8:00 Class' " + "group by ClassName, MeetTime, MeetDay, Location, Comments, Instructor, DevotionalLeader " + "order by ClassName"; SqlCommand cmd4 = new SqlCommand(sql4, con); cmd4.CommandTimeout = 120000;//Connection Timeout 2 minutes. SqlDataAdapter custDA4 = new SqlDataAdapter(); custDA4.SelectCommand = cmd4; DataSet custDS4 = new DataSet(); custDA4.Fill(custDS4, "PerformingArtsAcademyAvailableClasses"); if (FoundRecord2 == false) { ddlClass2.Items.Add("Select a class."); ddlClass2.Text = "Select a class."; } //Iterate over setup records and call method to do the work on each one...RCM.. foreach (DataRow myDataRowPO in custDS4.Tables["PerformingArtsAcademyAvailableClasses"].Rows) { //Adding options to the drop downs for a new entry. ddlClass2.Items.Add(myDataRowPO[0].ToString()); } ddlClass2.Items.Add(" ");//RCM..2/9/11. custDS4.Clear(); lblName.Text = Request.QueryString["VolunteerLastName"] + "," + Request.QueryString["VolunteerFirstName"]; lblName.Font.Size = 16; //ddlClass1.Enabled = false; //ddlClass2.Enabled = false; //imgStudent.ImageUrl = "~/VolunteerPictures/" + Request.QueryString["VolunteerFirstName"] + Request.QueryString["VolunteerLastName"] + ".jpg"; } catch (Exception lkjl) { string lkaaa = ""; } finally { } } else { //Ryan C Manners..1/5/11 //Do NOT ALLOW ACCESS TO THE PAGE! Response.Redirect("ErrorAccess.aspx"); } } }
protected void Page_Load(object sender, System.EventArgs e) { if (!Page.IsPostBack) { //Populate the Department Query string...RCM..6/28/11 Department = Request.QueryString["Dept"]; //Ryan C Manners...6/16/11. UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); //Check for a login... If not, re-direct them to the mainmenu page..RCM.. if (Request.QueryString["security"] == "Good") { try { con.Open(); string selectSQL = ""; selectSQL = "select lastname, firstname, middlename " + "from UIF_PerformingArts.dbo.studentinformation " + "group by lastname, firstname, middlename " + "order by lastname, firstname "; SqlDataReader reader = null; SqlCommand cmd = new SqlCommand(selectSQL); cmd.Connection = con; reader = cmd.ExecuteReader(); if (reader.Read()) { //Retrieve the first record only ddlNames.Items.Add("Please select a student"); do { ddlNames.Items.Add(reader.GetString(0) + "," + reader.GetString(1) + " (" + reader.GetString(2) + ") "); } while (reader.Read()); reader.Close(); ddlNames.Text = "Please select a student"; } //btnSearch.Enabled = false; string selectSQL2 = ""; selectSQL2 = "select lastname, firstname, middlename " + "from UIF_PerformingArts.dbo.studentinformation " + "group by lastname, firstname, middlename " + "order by firstname, lastname "; SqlDataReader reader2 = null; SqlCommand cmd2 = new SqlCommand(selectSQL2); cmd2.Connection = con; reader2 = cmd2.ExecuteReader(); if (reader2.Read()) { //Retrieve the first record only ddlNames2.Items.Add("Please select a student"); do { ddlNames2.Items.Add(reader2.GetString(1) + " " + reader2.GetString(0) + " (" + reader2.GetString(2) + ") "); //ddlNames2.Items.Add(reader2.GetString(1) + " (" + reader2.GetString(2) + ") " + reader2.GetString(0)); } while (reader2.Read()); reader2.Close(); ddlNames2.Text = "Please select a student"; } } catch (Exception lkj) { } finally { } } else { //Ryan C Manners..1/5/11 //Do NOT ALLOW ACCESS TO THE PAGE! //Response.Redirect("ErrorAccess.aspx"); Response.Redirect("ErrorAccess.aspx?Security=Good&lastname=" + Request.QueryString["lastname"] + "&firstname=" + Request.QueryString["firstname"] + "&Dept=" + Request.QueryString["Dept"]); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //Populate the Department Query string...RCM..6/28/11 Department = Request.QueryString["Dept"]; //Ryan C Manners...6/16/11. UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); if (Request.QueryString["security"] == "Good") { try { con.Open(); string selectSQL = "select lastname, firstname " + "from volunteerinformation " + "group by lastname, firstname " + "order by lastname, firstname "; SqlDataReader reader = null; SqlCommand cmd = new SqlCommand(selectSQL); cmd.Connection = con; reader = cmd.ExecuteReader(); if (reader.Read()) { //Retrieve the first record only ddlVolunteerList.Items.Add("Please select a volunteer"); do { ddlVolunteerList.Items.Add(reader.GetString(0) + "," + reader.GetString(1)); } while (reader.Read()); reader.Close(); ddlVolunteerList.Text = "Please select a volunteer"; } //btnSearch.Enabled = false; string selectSQL2 = "select lastname, firstname " + "from volunteerinformation " + "group by lastname, firstname " + "order by firstname, lastname "; SqlDataReader reader2 = null; SqlCommand cmd2 = new SqlCommand(selectSQL2); cmd2.Connection = con; reader2 = cmd2.ExecuteReader(); if (reader2.Read()) { //Retrieve the first record only ddlVolunteerList2.Items.Add("Please select a volunteer"); do { ddlVolunteerList2.Items.Add(reader2.GetString(1) + " " + reader2.GetString(0)); } while (reader2.Read()); reader2.Close(); ddlVolunteerList2.Text = "Please select a volunteer"; } ////btnSearch.Enabled = false; } catch (Exception lkj) { } finally { } //try //{ // string sql_LoadGrid = "select * from VolunteerInformation order by lastname, firstname "; // SqlDataAdapter da = new SqlDataAdapter(sql_LoadGrid, con); // DataSet ds = new DataSet(); // da.Fill(ds, "VolunteerInformation"); // gvVolunteerList.DataSource = ds.Tables[0]; // gvVolunteerList.DataBind(); // con.Close(); //} //catch (Exception lkjl_) //{ // string lkjl = ""; //} } else { //Ryan C Manners..1/5/11 //Do NOT ALLOW ACCESS TO THE PAGE! Response.Redirect("ErrorAccess.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //Populate the Department Query string...RCM..6/28/11 Department = Request.QueryString["Dept"]; //Ryan C Manners...6/16/11. UrbanImpactCommon.HTML BuildMenu = new UrbanImpactCommon.HTML(); MenuBest = BuildMenu.BuildMenuControl(MenuBest); if (Request.QueryString["security"] == "Good") { RetreiveDataForDisplay(); if (((Request.QueryString["LastName"] == "Manners") && (Request.QueryString["FirstName"] == "Ryan"))) { cmbRetrieveReport.Visible = true; } ddlReports.Items.Add("Please Select a Report"); ddlReports.Items.Add("CoreKids By School"); ddlReports.Items.Add("CoreKids By ZipCode"); ddlReports.Items.Add("CoreKids By Church"); ddlReports.Text = "Please Select a Report"; ddlReportProgram.Items.Add("Please Select a Program"); if (Department == "Athletics") { ddlReportProgram.Items.Add("Baseball"); ddlReportProgram.Items.Add("BasketballTEAMS"); ddlReportProgram.Items.Add("Outreach Basketball"); ddlReportProgram.Items.Add("MS Basketball League"); ddlReportProgram.Items.Add("HS Basketball League"); ddlReportProgram.Items.Add("SoccerIntraMurals"); ddlReportProgram.Items.Add("SoccerTEAMS"); ddlReportProgram.Items.Add("Bible Study"); ddlReportProgram.Items.Add("MondayNights"); ddlReportProgram.Items.Add("Special Events"); ddlReportProgram.Items.Add("3on3Basketball"); } else if (Department == "PerformingArts") { ddlReportProgram.Items.Add("MSHS Choir"); ddlReportProgram.Items.Add("Childrens Choir"); ddlReportProgram.Items.Add("PerformingArtsAcademy"); ddlReportProgram.Items.Add("Singers"); ddlReportProgram.Items.Add("Shakes"); } else if (Department == "Education") { ddlReportProgram.Items.Add("SummerDayCamp"); ddlReportProgram.Items.Add("SummerDayCamp"); } else { ddlReportProgram.Items.Add("Baseball"); ddlReportProgram.Items.Add("BasketballTEAMS"); ddlReportProgram.Items.Add("Outreach Basketball"); ddlReportProgram.Items.Add("MS Basketball League"); ddlReportProgram.Items.Add("HS Basketball League"); ddlReportProgram.Items.Add("SoccerIntraMurals"); ddlReportProgram.Items.Add("SoccerTEAMS"); ddlReportProgram.Items.Add("Bible Study"); ddlReportProgram.Items.Add("MondayNights"); ddlReportProgram.Items.Add("Special Events"); ddlReportProgram.Items.Add("3on3Basketball"); ddlReportProgram.Items.Add("MSHS Choir"); ddlReportProgram.Items.Add("Childrens Choir"); ddlReportProgram.Items.Add("PerformingArtsAcademy"); ddlReportProgram.Items.Add("Singers"); ddlReportProgram.Items.Add("Shakes"); } ddlReportProgram.Text = "Please Select a Program"; } else { //Ryan C Manners..1/5/11 //Do NOT ALLOW ACCESS TO THE PAGE! Response.Redirect("ErrorAccess.aspx"); } } }