Example #1
0
        /*
         * Remove coordinates from database
         */
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (coordinatesToDelete.Count() > 0)
            {
                bool success = true;

                // Delete all auditions between the two students with the selected audition type
                foreach (Tuple <int, int, string> coordination in coordinatesToDelete)
                {
                    success = success && DbInterfaceStudentAudition.RemoveCoordinatesByStudentIdAndType(coordination.Item1, coordination.Item2, coordination.Item3, ddlAuditionType.SelectedValue.ToUpper().Equals("DISTRICT"));
                }

                if (success)
                {
                    clearAll();
                    showSuccessMessage("The coordinations were successfully deleted.");
                }
                else
                {
                    showErrorMessage("The coordinations could not be deleted");
                }
            }
            else
            {
                showInfoMessage("There were no coordinates to delete.");
            }
        }