Exemplo n.º 1
0
        /*
         * Pre:  audition must exist as the id of an audition in the system
         * Post: The existing data for the audition associated with the auditionId
         *       is loaded to the page.
         * @param auditionId is the id of the audition being edited
         */
        private void loadSchedule(int auditionId)
        {
            try
            {
                DataTable scheduleTable = DbInterfaceAudition.LoadEventScheduleDataTable(auditionId, true);
                //load data to page
                if (scheduleTable != null && scheduleTable.Rows.Count > 0)
                {
                    gvSchedule.DataSource = scheduleTable;
                    gvSchedule.DataBind();
                    Session[scheduleData] = scheduleTable;
                }
                else
                {
                    showErrorMessage("Error: The schedule information could not be loaded.  Please make sure that a schedule has been created and saved.");
                    Session[scheduleData] = null;
                }
            }
            catch (Exception e)
            {
                showErrorMessage("Error: An error occurred while loading the audition data.");

                Utility.LogError("Schedule View", "loadSchedule", "auditionId: " + auditionId, "Message: " + e.Message + "   Stack Trace: " + e.StackTrace, -1);
            }

            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "RefreshDatepickers", "refreshDatePickers()", true);
        }
Exemplo n.º 2
0
        /*
         * Show the times that have been assigned to the audition, but are not yet
         * submitted to the final version of the schedule
         */
        private void ShowTimes(int auditionOrgId)
        {
            DataTable scheduleTable = DbInterfaceAudition.LoadEventScheduleDataTable(auditionOrgId, false);

            //load data to page
            if (scheduleTable != null && scheduleTable.Rows.Count > 0)
            {
                gvSchedule.DataSource = scheduleTable;
                gvSchedule.DataBind();
                Session[scheduleData] = scheduleTable;

                // Switch buttons
                btnSaveOrder.Visible   = false;
                btnAssignTimes.Visible = false;
                pnlInputs.Visible      = false;
                btnContinue.Visible    = true;
                btnSave.Visible        = true;
                lblAudition2.Visible   = true;
            }
            else
            {
                showErrorMessage("Error: The schedule information could not be loaded.  Please make sure that a schedule has been created and saved.");
                Session[scheduleData] = null;
            }
        }