Пример #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 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);
                }

                // Update gridview
                DataTable table = DbInterfaceAudition.GetDistrictDataDump(auditionOrgId, teacherId);
                gvAuditions.DataSource = table;
                gvAuditions.DataBind();
            }
            else
            {
                showWarningMessage("No audition exists matching the input criteria.");
            }
        }