public bool AddTeacher(NewPersonDTO request)
 {
     try
     {
         return(_TeachersRepo.AddTeacher(request.ClientId, request.Name, request.LastName1, request.LastName2, request.Birthday, request.Genre, request.Email, request.Phone));
     }
     catch (Exception e)
     {
         return(false);
     }
 }
Exemple #2
0
 public ActionResult AddTeacher(TeachersViewModel vm)
 {
     try
     {
         TeachersRepository.AddTeacher(vm.TeacherToAdd);
         TempData["userAdded"] = "1";
     }
     catch (Exception ex)
     {
         TempData["userAdded"] = "0";
     }
     return(RedirectToAction("Show"));
 }