Exemple #1
0
        /*
         * Pre:
         * Post: Loads the information of the selected audition and saves it to a session variable
         */
        private void resetAuditionVar()
        {
            try
            {
                int     auditionId = Convert.ToInt32(cboAudition.SelectedValue);
                int     studentId  = Convert.ToInt32(Convert.ToInt32(txtStudentId.Text));
                Student student    = DbInterfaceStudent.LoadStudentData(studentId);

                //get all audition info associated with audition id and save as session variable
                if (student != null)
                {
                    audition = new StateAudition(auditionId, student, false);
                    audition = DbInterfaceStudentAudition.GetStudentStateAudition(audition.districtAudition, auditionId);

                    if (audition != null)
                    {
                        Session[auditionVar] = audition;

                        //if the audition was a duet, show label to inform user that the points for the
                        //partner will also be updated
                        if (audition.auditionType.ToUpper().Equals("DUET"))
                        {
                            showInfoMessage("The composition points of the student's duet partner will also be updated.");
                        }

                        setPoints();
                    }
                }
            }
            catch (Exception e)
            {
                Utility.LogError("Badger Point Entry", "resetAuditionVar", "", "Message: " + e.Message + "   Stack Trace: " + e.StackTrace, -1);
            }
        }