/*
         * Pre:
         * Post: Get audition information for the input year, audition type, and student
         *       if a matching audition exists
         * @param studentId is the unique id of the student
         * @year is the year of the audition
         * @auditionType signifies whether the points are being entered for HS Virtuoso
         *               or Composition
         */
        private void loadAudition(int studentId, int year, string auditionType)
        {
            //get student
            Student student = DbInterfaceStudent.LoadStudentData(studentId);

            //get audition
            if (student != null)
            {
                audition = DbInterfaceStudentAudition.GetStudentHsOrCompositionAudition(student, year, auditionType);

                Session[auditionVar] = audition;

                //set points on screen
                if (audition != null)
                {
                    setPoints();
                }
                else
                {
                    rblAttendance.SelectedIndex = 1;
                    ddlRoomAward.SelectedIndex  = 0;
                    lblPoints.InnerText         = "0";
                    btnSubmit.Text       = "Submit";
                    ddlRoomAward.Enabled = true;
                }
            }
            else
            {
                lblErrorMsg.Text    = "There was an error loading the student data";
                lblErrorMsg.Visible = true;
            }
        }
        /*
         * Pre:
         * Post: Loads the information of the selected audition and saves it to a session variable
         */
        private void resetAuditionVar()
        {
            int studentId;

            try
            {
                if (Int32.TryParse(txtStudentId.Text, out studentId))
                {
                    Student student      = DbInterfaceStudent.LoadStudentData(studentId);
                    int     year         = Convert.ToInt32(ddlYear.SelectedValue);
                    string  auditionType = ddlAuditionType.SelectedValue;

                    //get all audition info associated with audition id and save as session variable
                    if (student != null)
                    {
                        audition             = new HsVirtuosoCompositionAudition(student, year, auditionType);
                        Session[auditionVar] = audition;
                    }
                }
            }
            catch (Exception e)
            {
                Utility.LogError("HS Virtuoso Composition Point Entry", "resetAuditionVar", "", "Message: " + e.Message + "   Stack Trace: " + e.StackTrace, -1);
            }
        }
        /*
         * Pre:
         * Post: Get audition information for the input year, audition type, and student
         *       if a matching audition exists
         * @param studentId is the unique id of the student
         * @year is the year of the audition
         * @auditionType signifies whether the points are being entered for HS Virtuoso
         *               or Composition
         */
        private void loadAudition(int studentId, int year, string auditionType)
        {
            //get student
            Student student = DbInterfaceStudent.LoadStudentData(studentId);

            //get audition
            if (student != null)
            {
                audition = DbInterfaceStudentAudition.GetStudentHsOrCompositionAudition(student, year, auditionType);

                Session[auditionVar] = audition;

                //set points on screen
                if (audition != null)
                {
                    setPoints();
                }
                else
                {
                    rblAttendance.SelectedIndex = 0;
                    ddlRoomAward.SelectedIndex  = 0;
                    ddlRoomAward.Enabled        = true;
                    lblPoints.Text = "10";
                }
            }
            else
            {
                showErrorMessage("Error: There was an error loading the student data.");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            checkPermissions();

            if (!Page.IsPostBack)
            {
                Session[auditionVar]   = null;
                Session[studentSearch] = null;
                loadYearDropdown();
            }

            //if an audition object has been instantiated, reload
            if (Page.IsPostBack && Session[auditionVar] != null)
            {
                audition = (HsVirtuosoCompositionAudition)Session[auditionVar];
            }
        }