Exemplo n.º 1
0
        public void OnPost()
        {
            NAITProgram ActiveStudents = new NAITProgram();

            RequestDirector = new BCS();
            ActiveStudents.EnrolledStudent = RequestDirector.FindStudentsByProgram(ProgramCode);
            if (ActiveStudents.EnrolledStudent.Count < 1)
            {
                Success = RequestDirector.DeleteProgram(ProgramCode);
                if (Success == true)
                {
                    Message     = "Program " + ProgramCode + " Deleted Successfully";
                    ProgramCode = null;
                    Description = null;
                }
                else
                {
                    Message = "Program Delete Failed";
                }
            }
            else
            {
                Message = "There are Currently Students in " + ProgramCode + " Unable to Delete.";
            }
        }