コード例 #1
0
        /*
         * Pre:
         * Post: If an event matching the search criteria is found, execute
         *       the reports for that audition
         */
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            int auditionOrgId = DbInterfaceAudition.GetAuditionOrgId(Convert.ToInt32(ddlDistrictSearch.SelectedValue),
                                                                     Convert.ToInt32(ddlYear.SelectedValue));

            if (auditionOrgId != -1)
            {
                int teacherId = 0;
                if (ddlTeacher.SelectedIndex >= 0 && !ddlTeacher.SelectedValue.Equals(""))
                {
                    teacherId = Convert.ToInt32(ddlTeacher.SelectedValue);
                }

                int districtId = Convert.ToInt32(ddlDistrictSearch.SelectedValue);

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

                createReport("BadgerPianoJudgingForm", rptPianoForm, auditionOrgId, teacherId);
                createReport("BadgerOrganJudgingForm", rptOrganForm, auditionOrgId, teacherId);
                createReport("BadgerVocalJudgingForm", rptVocalForm, auditionOrgId, teacherId);
                createReport("BadgerStringsJudgingForm", rptStringsForm, auditionOrgId, teacherId);
                createReport("BadgerInstrumentalJudgingForm", rptInstrumentalForm, auditionOrgId, teacherId);
            }
            else
            {
                showWarningMessage("No audition exists matching the input criteria.");
            }
        }
コード例 #2
0
        /*
         * Pre:
         * Post: Load the auditions for the selected event.  Filter on teacher if a teacher was selected
         */
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            int year          = Convert.ToInt32(ddlYear.SelectedValue);
            int districtId    = Convert.ToInt32(ddlDistrictSearch.SelectedValue);
            int auditionOrgId = DbInterfaceAudition.GetAuditionOrgId(districtId, year);

            if (auditionOrgId != -1)
            {
                int teacherId = 0;
                if (ddlTeacher.SelectedIndex >= 0 && !ddlTeacher.SelectedValue.Equals(""))
                {
                    teacherId = Convert.ToInt32(ddlTeacher.SelectedValue);
                }

                // Update gridview
                Dictionary <int, StateAudition> auditions = DbInterfaceAudition.GetFullDataDump(auditionOrgId, teacherId, year, districtId);
                DataTable table = PopulateTable(auditions);
                gvAuditions.DataSource = table;
                gvAuditions.DataBind();
            }
            else
            {
                showWarningMessage("No audition exists matching the input criteria.");
            }
        }
コード例 #3
0
        /*
         * Pre:
         * Post: If an event matching the search criteria is found, execute
         *       the reports for that audition
         */
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            //get selected teacher
            int teacherId = 0;

            if (ddlTeacher.SelectedIndex >= 0 && !ddlTeacher.SelectedValue.Equals(""))
            {
                teacherId = Convert.ToInt32(ddlTeacher.SelectedValue);
            }

            int districtId = 0;

            if (ddlDistrictSearch.SelectedIndex >= 0 && !ddlDistrictSearch.SelectedValue.Equals(""))
            {
                districtId = Convert.ToInt32(ddlDistrictSearch.SelectedValue);
            }

            int auditionOrgId = DbInterfaceAudition.GetAuditionOrgId(districtId,
                                                                     Convert.ToInt32(ddlYear.SelectedValue));

            if (auditionOrgId != -1)
            {
                showInfoMessage("Please allow several minutes for your reports to generate.");

                createReport("DistrictTeacherDetail", rptTeacherDetail, auditionOrgId, teacherId);
            }
            else
            {
                showWarningMessage("No audition exists matching the input criteria.");
            }
        }
コード例 #4
0
        /*
         * Pre:
         * Post: If an event matching the search criteria is found, execute
         *       the reports for that audition
         */
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            int auditionOrgId = DbInterfaceAudition.GetAuditionOrgId(Convert.ToInt32(ddlDistrictSearch.SelectedValue),
                                                                     Convert.ToInt32(ddlYear.SelectedValue));

            if (auditionOrgId != -1)
            {
                int teacherId  = Utility.GetTeacherId((User)Session[Utility.userRole]);
                int districtId = Convert.ToInt32(ddlDistrictSearch.SelectedValue);

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

                // Have two different report types so reports can be printed front-to-back *per student*
                // D2 and D2NM use Even paged reports and print off front-to-back without breaks since students have 2 compositions
                // D3 and State use Odd paged reports and print a blank page between students so they can be printed front-to-back, but not have multiple students on the front/back of the same piece of paper
                // Just go with it.
                createReport("DistrictPianoJudgingFormEven", rptPianoFormE, auditionOrgId, teacherId, "E");
                createReport("DistrictPianoJudgingFormOdd", rptPianoFormO, auditionOrgId, teacherId, "O");
                createReport("DistrictOrganJudgingFormEven", rptOrganFormE, auditionOrgId, teacherId, "E");
                createReport("DistrictOrganJudgingFormOdd", rptOrganFormO, auditionOrgId, teacherId, "O");
                createReport("DistrictVocalJudgingFormEven", rptVocalFormE, auditionOrgId, teacherId, "E");
                createReport("DistrictVocalJudgingFormOdd", rptVocalFormO, auditionOrgId, teacherId, "O");
                createReport("DistrictInstrumentalJudgingFormEven", rptInstrumentalFormE, auditionOrgId, teacherId, "E");
                createReport("DistrictInstrumentalJudgingFormOdd", rptInstrumentalFormO, auditionOrgId, teacherId, "O");
                createReport("DistrictStringsJudgingFormEven", rptStringsFormE, auditionOrgId, teacherId, "E");
                createReport("DistrictStringsJudgingFormOdd", rptStringsFormO, auditionOrgId, teacherId, "O");
            }
            else
            {
                showWarningMessage("No audition exists matching the input criteria.");
            }
        }
コード例 #5
0
        /*
         * Load the judge's preferences and the audition's time ranges
         */
        private void LoadJudgeAndAuditionData()
        {
            if (ddlDistrict.SelectedIndex > 0 && ddlYear.SelectedIndex > 0)
            {
                int auditionOrgId = DbInterfaceAudition.GetAuditionOrgId(Convert.ToInt32(ddlDistrict.SelectedValue), Convert.ToInt32(ddlYear.SelectedValue));

                if (auditionOrgId != -1)
                {
                    //LoadAuditionTimes(auditionOrgId);
                    LoadJudgePreferences(auditionOrgId);

                    pnlJudges.Visible  = true;
                    pnlButtons.Visible = true;
                }
                else
                {
                    showWarningMessage("The audition for the selected year has not been created.");
                }
            }
            else
            {
                pnlJudges.Visible  = false;
                pnlButtons.Visible = false;
            }
        }
コード例 #6
0
        private void selectAudition()
        {
            User user = (User)Session[Utility.userRole];

            if (!user.permissionLevel.Contains('A') && ddlDistrictSearch.SelectedIndex > 0)
            {
                upAuditionSearch.Visible = false;
                upViewSchedule.Visible   = true;
                upInputs.Visible         = true;
                //pnlButtons.Visible = true;

                int year = DateTime.Today.Year;
                if (DateTime.Today.Month >= 6 && !Utility.reportSuffix.Equals("Test"))
                {
                    year = year + 1;
                }

                ddlYear.SelectedIndex = ddlYear.Items.IndexOf(ddlYear.Items.FindByValue(year.ToString()));

                int auditionOrgId = DbInterfaceAudition.GetAuditionOrgId(Convert.ToInt32(ddlDistrictSearch.SelectedValue), year);
                lblAudition.Text   = ddlDistrictSearch.SelectedItem.Text + " " + ddlYear.Text + " Schedule";
                lblAudition2.Text  = lblAudition.Text;
                lblAuditionId.Text = auditionOrgId.ToString();

                LoadScheduleInformation(auditionOrgId);
            }
            else if (user.permissionLevel.Contains('A'))
            {
                upAuditionSearch.Visible = false;
                upViewSchedule.Visible   = true;
                upInputs.Visible         = true;
                //pnlButtons.Visible = true;

                int index = gvAuditionSearch.SelectedIndex;

                if (index >= 0 && index < gvAuditionSearch.Rows.Count)
                {
                    ddlDistrictSearch.SelectedIndex =
                        ddlDistrictSearch.Items.IndexOf(ddlDistrictSearch.Items.FindByText(
                                                            gvAuditionSearch.Rows[index].Cells[2].Text));
                    ddlYear.SelectedIndex = ddlYear.Items.IndexOf(ddlYear.Items.FindByValue(
                                                                      gvAuditionSearch.Rows[index].Cells[3].Text));

                    lblAudition.Text   = ddlDistrictSearch.SelectedItem.Text + " " + ddlYear.Text + " Schedule";
                    lblAudition2.Text  = lblAudition.Text;
                    lblAuditionId.Text = gvAuditionSearch.Rows[index].Cells[1].Text;

                    LoadScheduleInformation(Convert.ToInt32(lblAuditionId.Text));
                }
            }
        }
コード例 #7
0
        /*
         * Pre:
         * Post: If an event matching the search criteria is found, execute
         *       the reports for that audition
         */
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            int auditionOrgId = DbInterfaceAudition.GetAuditionOrgId(Convert.ToInt32(ddlDistrictSearch.SelectedValue),
                                                                     Convert.ToInt32(ddlYear.SelectedValue));

            if (auditionOrgId != -1)
            {
                showInfoMessage("Please allow several minutes for your reports to generate.");

                createReport("DistrictChairSummaryReport", rptSummary, auditionOrgId);
            }
            else
            {
                showWarningMessage("No audition exists matching the input criteria.");
            }
        }
コード例 #8
0
        /*
         * Pre:
         * Post: If an event matching the search criteria is found, execute
         *       the reports for that audition
         */
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            int auditionOrgId = DbInterfaceAudition.GetAuditionOrgId(Convert.ToInt32(ddlDistrictSearch.SelectedValue),
                                                                     Convert.ToInt32(ddlYear.SelectedValue));

            if (auditionOrgId != -1)
            {
                int teacherId = Utility.GetTeacherId((User)Session[Utility.userRole]);

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

                createReport("RegistrationReport_V2", rptRegistration, auditionOrgId, teacherId);
            }
            else
            {
                showWarningMessage("No audition exists matching the input criteria.");
            }
        }
コード例 #9
0
        /*
         * Pre:
         * Post: If an event matching the search criteria is found, execute
         *       the reports for that audition
         */
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            int teacherId     = ddlTeacher.SelectedIndex >= 0 && !ddlTeacher.SelectedValue.Equals("") ? Convert.ToInt32(ddlTeacher.SelectedValue) : 0;
            int auditionOrgId = DbInterfaceAudition.GetAuditionOrgId(Convert.ToInt32(ddlDistrictSearch.SelectedValue),
                                                                     Convert.ToInt32(ddlYear.SelectedValue));

            if (auditionOrgId != -1)
            {
                showInfoMessage("Please allow several minutes for your reports to generate.");

                createReport("DistrictStudentResults_V2", rptResults, auditionOrgId, teacherId);
                createReportWithYear("OutOfDistrictStudentResults_V2", rptOutOfDistrictResults, Convert.ToInt32(ddlDistrictSearch.SelectedValue), teacherId, Convert.ToInt32(ddlYear.SelectedValue));
            }
            else
            {
                showWarningMessage("No audition exists matching the input criteria.");
            }
        }
コード例 #10
0
        private void selectAudition()
        {
            pnlMain.Visible          = true;
            pnlButtons.Visible       = true;
            upAuditionSearch.Visible = false;
            clearAllExceptSearch();

            User user = (User)Session[Utility.userRole];

            if (!user.permissionLevel.Contains('A') && ddlDistrictSearch.SelectedIndex > 0)
            {
                int year = DateTime.Today.Year;
                if (DateTime.Today.Month >= 6)
                {
                    year = year + 1;
                }

                // Look at current year no matter what if on the test site
                if (Utility.reportSuffix.Equals("Test"))  //delete this
                {
                    year = DateTime.Today.Year;
                }

                loadAuditionData(DbInterfaceAudition.GetAuditionOrgId(Convert.ToInt32(ddlDistrictSearch.SelectedValue), year));
            }
            else if (user.permissionLevel.Contains('A'))
            {
                int index = gvAuditionSearch.SelectedIndex;

                if (index >= 0 && index < gvAuditionSearch.Rows.Count)
                {
                    ddlDistrictSearch.SelectedIndex =
                        ddlDistrictSearch.Items.IndexOf(ddlDistrictSearch.Items.FindByText(
                                                            gvAuditionSearch.Rows[index].Cells[2].Text));
                    ddlYear.SelectedIndex = ddlYear.Items.IndexOf(ddlYear.Items.FindByValue(
                                                                      gvAuditionSearch.Rows[index].Cells[3].Text));
                    loadAuditionData(Convert.ToInt32(gvAuditionSearch.Rows[index].Cells[1].Text));
                }
            }
        }
コード例 #11
0
        private void selectAudition()
        {
            User user = (User)Session[Utility.userRole];

            if (!user.permissionLevel.Contains('A') && ddlDistrictSearch.SelectedIndex > 0)
            {
                int year = DateTime.Today.Year;
                if (DateTime.Today.Month >= 6 && !Utility.reportSuffix.Equals("Test"))
                {
                    year = year + 1;
                }

                ddlYear.SelectedIndex = ddlYear.Items.IndexOf(ddlYear.Items.FindByValue(year.ToString()));

                loadAuditionData(DbInterfaceAudition.GetAuditionOrgId(Convert.ToInt32(ddlDistrictSearch.SelectedValue), year), year);
            }
            else if (user.permissionLevel.Contains('A'))
            {
                int index = gvAuditionSearch.SelectedIndex;

                if (index >= 0 && index < gvAuditionSearch.Rows.Count)
                {
                    int auditionId = Convert.ToInt32(gvAuditionSearch.Rows[index].Cells[1].Text);

                    //populate event information
                    ddlDistrictSearch.SelectedIndex =
                        ddlDistrictSearch.Items.IndexOf(ddlDistrictSearch.Items.FindByText(
                                                            gvAuditionSearch.Rows[index].Cells[2].Text));

                    ddlYear.SelectedIndex = ddlYear.Items.IndexOf(ddlYear.Items.FindByValue(
                                                                      gvAuditionSearch.Rows[index].Cells[3].Text));

                    loadAuditionData(auditionId, Convert.ToInt32(ddlYear.SelectedValue));
                }
            }
        }
コード例 #12
0
        /*
         * Submit the changes to the judge's preferences for the selected audition
         */
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int  contactId = -1;
            bool success   = true;

            if (ddlDistrict.SelectedIndex > 0 && ddlYear.SelectedIndex > 0 && Int32.TryParse(lblId.Text, out contactId))
            {
                int auditionOrgId = DbInterfaceAudition.GetAuditionOrgId(Convert.ToInt32(ddlDistrict.SelectedValue), Convert.ToInt32(ddlYear.SelectedValue));

                // Delete all current preferences for the audition before updating
                DbInterfaceJudge.DeleteJudgePreferences(contactId, auditionOrgId, false);

                // Add new audition tracks
                foreach (ListItem item in chkLstTrack.Items)
                {
                    if (item.Selected && item.Value.Equals("District")) // Convert District to D2, D2NM, and D3
                    {
                        success = success && DbInterfaceJudge.AddJudgeAuditionLevel(contactId, auditionOrgId, "D2");
                        success = success && DbInterfaceJudge.AddJudgeAuditionLevel(contactId, auditionOrgId, "D2NM");
                        success = success && DbInterfaceJudge.AddJudgeAuditionLevel(contactId, auditionOrgId, "D3");
                    }
                    else if (item.Selected)
                    {
                        success = success && DbInterfaceJudge.AddJudgeAuditionLevel(contactId, auditionOrgId, "State");
                    }
                }

                // Add new audition types
                foreach (ListItem item in chkLstType.Items)
                {
                    if (item.Selected)
                    {
                        success = success && DbInterfaceJudge.AddJudgeAuditionType(contactId, auditionOrgId, item.Value);
                    }
                }

                // Add new comp levels
                foreach (ListItem item in chkLstCompLevel.Items)
                {
                    if (item.Selected)
                    {
                        success = success && DbInterfaceJudge.AddJudgeLevel(contactId, auditionOrgId, item.Value);
                    }
                }

                // Add new instruments
                foreach (ListItem item in chkLstInstrument.Items)
                {
                    if (item.Selected)
                    {
                        success = success && DbInterfaceJudge.AddJudgeInstrument(contactId, auditionOrgId, item.Value);
                    }
                }

                // Add new time preferences
                //foreach (ListItem item in chkLstTime.Items)
                //{
                //    if (item.Selected)
                //        success = success && DbInterfaceJudge.AddJudgeTime(contactId, auditionOrgId, Convert.ToInt32(item.Value));
                //}
            }
            else
            {
                showWarningMessage("Please select a judge, district, and year.");
                success = false;
            }

            if (success)
            {
                showSuccessMessage("The judge's preferences were successfully updated.");
                clearPage();
            }
            else
            {
                showErrorMessage("There was an error updating the judge's preferences");
            }
        }