/*
         * Pre:
         * Post: If an event matching the search criteria is found, execute
         *       the reports for that audition
         */
        //Modified by Daniel Leo 3/3/2019
        //Added AC and PE tests

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            string[]       theoryTests = new string[] { "AA", "AB", "AC", "EA-alto", "EA-bass", "EA-keybrd", "EA-treble", "EB-alto", "EB-bass", "EB-keybrd", "EB-treble", "EC", "IA", "IB", "IC", "PE" };
            ReportViewer[] rptViewers  = new ReportViewer[] { rptAA, rptAB, rptAC, rptEAalto, rptEAbass, rptEAkeybrd, rptEAtreble, rptEBalto, rptEBbass, rptEBkeybrd, rptEBtreble, rptEC, rptIA, rptIB, rptIC, rptPE };

            Tuple <int, string> orgIdAndSeries = DbInterfaceAudition.GetAuditionOrgIdAndTestSeries(Convert.ToInt32(ddlDistrictSearch.SelectedValue),
                                                                                                   Convert.ToInt32(ddlYear.SelectedValue));

            if (orgIdAndSeries.Item1 != -1 && !orgIdAndSeries.Item2.Equals(""))
            {
                int    auditionOrgId = orgIdAndSeries.Item1;
                string testSeries    = orgIdAndSeries.Item2;

                showInfoMessage("Please allow several minutes for your reports to generate.");

                for (int i = 0; i < theoryTests.Count(); i++)
                {
                    createReport("Theory_" + testSeries + "_" + theoryTests[i], rptViewers[i], auditionOrgId, testSeries, theoryTests[i]);
                }
            }
            else if (orgIdAndSeries.Item1 == -1)
            {
                showWarningMessage("No audition exists matching the input criteria.");
            }
            else if (orgIdAndSeries.Item2.Equals(""))
            {
                showWarningMessage("The selected audition does not have a theory test series specified.");
            }
        }