Example #1
0
        /// <summary>
        /// Load the auditions for the students where the freeze date has not yet passed
        /// </summary>
        private void loadAuditions()
        {
            int studentId = -1;

            if (ddlAuditionType.SelectedIndex > 0 && Int32.TryParse(lblStudId.InnerText, out studentId))
            {
                DataTable table = DbInterfaceStudentAudition.GetDistrictOrStateAuditionsForDropdownByYear(studentId, ddlAuditionType.SelectedValue.Equals("District"));
                cboAudition.DataSource = null;
                cboAudition.Items.Clear();
                cboAudition.DataSourceID = "";

                if (table.Rows.Count > 0)
                {
                    cboAudition.DataSource     = table;
                    cboAudition.DataTextField  = "DropDownInfo";
                    cboAudition.DataValueField = "AuditionId";
                    cboAudition.Items.Add(new ListItem(""));
                    cboAudition.DataBind();
                }
                else
                {
                    showWarningMessage("This student has no editable auditions for the selected year. Either no auditions have been created or the Freeze Date has passed.");
                }
            }
        }