Beispiel #1
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.");
            }
        }