Ejemplo n.º 1
0
        public static int RegistrationStudentToBranch(int studentId, int branchId)
        {
            string entryHebrewDate = DateConverter.GetHebrewDate(DateTime.Today);
            int    insert          = BranchStudentDataManager.RegistrationStudentToBranch(studentId, branchId, entryHebrewDate);

            return(insert);
        }
Ejemplo n.º 2
0
 public static int RequestRregistration(int studentId, int branchId, int?studyPathId)
 {
     try
     {
         int insert = BranchStudentDataManager.RequestRegistrationBranchStudent(studentId, branchId, studyPathId);
         return(insert);
     }
     catch (Exception)
     {
         _logger.Debug($"Failed to insert the requested branch by studentId: {studentId}.");
         throw;
     }
 }
Ejemplo n.º 3
0
 public static int RequestRregistration(BranchStudent branchStudent)
 {
     try
     {
         int insert = BranchStudentDataManager.RequestRegistrationBranchStudent(branchStudent);
         return(insert);
     }
     catch (Exception)
     {
         _logger.Debug($"Failed to insert the requested branch by student.");
         throw;
     }
 }
Ejemplo n.º 4
0
 public static int ApprovalRegistrationStudent(int branchStudentId)
 {
     try
     {
         string entryHebrewDate = DateConverter.GetHebrewDate(DateTime.Today);
         int    update          = BranchStudentDataManager.ApprovalRegistrationStudent(branchStudentId, entryHebrewDate);
         return(update);
     }
     catch (Exception)
     {
         _logger.Debug($"Failed to approve registration for the student in this branchbranch.");
         throw;
     }
 }
Ejemplo n.º 5
0
 public static int SetBranchOfStudentInactive(int studentId)
 {
     try
     {
         int update = 0;
         BranchesStudents branchesStudent   = BranchStudentDataManager.GetActiveBranchesOfStudent(studentId, Student.Includes.Branch);
         string           releaseHebrewDate = DateConverter.GetHebrewDate(DateTime.UtcNow);
         foreach (BranchStudent branchStudent in branchesStudent)
         {
             update = BranchStudentDataManager.SetStudentInactiveInBranch(studentId, branchStudent.Branch.Id, releaseHebrewDate);
             BranchManager.ReduceNumberOfStudents(branchStudent.Branch.Id);
         }
         return(update);
     }
     catch (Exception ex)
     {
         _logger.Debug("Failed to set the student to inactive in his branches.");
         throw;
     }
 }
Ejemplo n.º 6
0
 public static int SetStudentInactiveInBranch(int studentId, int branchId)
 {
     try
     {
         string releaseHebrewDate = DateConverter.GetHebrewDate(DateTime.UtcNow);
         int    update            = BranchStudentDataManager.SetStudentInactiveInBranch(studentId, branchId, releaseHebrewDate);
         if (update == 1)
         {
             BranchManager.ReduceNumberOfStudents(branchId);
         }
         BranchesStudents branchStudents = BranchStudentDataManager.GetActiveBranchesOfStudent(studentId);
         if (branchStudents.Count() == 0)
         {
             StudentDataManager.SetStudentInactive(studentId);
         }
         return(update);
     }
     catch (Exception)
     {
         _logger.Debug("Failed to set the student to inactive in this branch.");
         throw;
     }
 }
Ejemplo n.º 7
0
 public static int MakeBranchStudentsInactive(int branchId)
 {
     return(BranchStudentDataManager.MakeBranchStudentsInactive(branchId));
 }