public string Save(Enroll aEnroll)
        {
            if (aEnrollGateway.IsExist(aEnroll))
            {
                return("This Course Already Enrolled");
            }

            if (aEnrollGateway.Save(aEnroll) > 0)
            {
                return("Enrollment Successfully Done");
            }
            else
            {
                return("Failed");
            }
        }
Exemple #2
0
 public string Save(EnrollCourse enrollCourse)
 {
     if (enrollGateway.IsNameExsists(enrollCourse))
     {
         return("This Course Already Exist");
     }
     else
     {
         int rowAffect = enrollGateway.Save(enrollCourse);
         if (rowAffect > 0)
         {
             return("Save Successfuly");
         }
         else
         {
             return("Save Failed");
         }
     }
 }
Exemple #3
0
 public string Save(EnrollCourse enrollCourse)
 {
     if (aEnrollCourseGateway.AlreadyEnrolledInCourse(enrollCourse))
     {
         return("Course already enrolled");
     }
     else
     {
         int rowAffected = aEnrollCourseGateway.Save(enrollCourse);
         if (rowAffected > 0)
         {
             return("Enrolled Successfully");
         }
         else
         {
             return("Enrolled Failed");
         }
     }
 }
 public string Save(EnrollCourse aEnrollCourse)
 {
     if (aEnrollGateway.IsEnrollmentExists(aEnrollCourse))
     {
         return("One Student Enroll A Course Once only");
     }
     else
     {
         int rowAffected = aEnrollGateway.Save(aEnrollCourse);
         if (rowAffected > 0)
         {
             return("Enroll Successfull");
         }
         else
         {
             return("Failed");
         }
     }
 }
 public string Save(Student student)
 {
     if (aStudentGateway.IsCourseExists(student))
     {
         return("This course already enrolled");
     }
     else
     {
         int isRowAffected = aStudentGateway.Save(student);
         if (isRowAffected > 0)
         {
             return("Course enrolled successfull");
         }
         else
         {
             return("course enrolled failed");
         }
     }
 }