예제 #1
0
 public string Save(Register register)
 {
     if (registerStudentGateway.IsEmailExists(register.Email))
     {
         return("Email Already Exist");
     }
     else
     {
         int rowAffect = registerStudentGateway.Save(register);
         if (rowAffect > 0)
         {
             return(register.RegNo);
         }
         else
         {
             return("Student not Saved");
         }
     }
 }
예제 #2
0
 public string Save(RegisterStudent registerStudent)
 {
     if (registerStudentGateway.IsEmailExists(registerStudent.Email))
     {
         return("Email already exists");
     }
     else
     {
         int rowAffect = registerStudentGateway.Save(registerStudent);
         if (rowAffect > 0)
         {
             return("Save Successful");
         }
         else
         {
             return("Register Failed");
         }
     }
 }