internal List <Enroller> IsUsernameExist(string username)
 {
     try
     {
         var myItem = new EnrollerRepository().GetEnrollers().FindAll(x => x.UserName == username);
         if (!myItem.Any())
         {
             return(new List <Enroller>());
         }
         return(myItem);
     }
     catch (Exception ex)
     {
         BugManager.LogApplicationBug(ex.StackTrace, ex.Source, ex.Message);
         return(null);
     }
 }
 internal List <Enroller> IsSINExist(long clientStationId, string sin)
 {
     try
     {
         //var myItem =
         //    new EnrollerRepository().GetEnrollers()
         //        .FindAll(x => x.OrganizationId == organizationId && x.EnrollerRegId == sin);
         var myItem =
             new EnrollerRepository().GetEnrollers()
             .FindAll(x => x.ClientStationId == clientStationId && x.EnrollerRegId == sin);
         if (!myItem.Any())
         {
             return(new List <Enroller>());
         }
         return(myItem);
     }
     catch (Exception ex)
     {
         BugManager.LogApplicationBug(ex.StackTrace, ex.Source, ex.Message);
         return(new List <Enroller>());
     }
 }
Beispiel #3
0
 internal List <Enroller> IsPhoneNumberExist(long organizationId, string phoneNo)
 {
     try
     {
         //var myItem =
         //    new EnrollerRepository().GetEnrollers()
         //        .FindAll(x => x.OrganizationId == organizationId && x.MobileNumber == phoneNo);
         var myItem =
             new EnrollerRepository().GetEnrollers()
             .FindAll(x => x.MobileNumber == phoneNo);
         if (!myItem.Any())
         {
             return(new List <Enroller>());
         }
         return(myItem);
     }
     catch (Exception ex)
     {
         BugManager.LogApplicationBug(ex.StackTrace, ex.Source, ex.Message);
         return(null);
     }
 }