Beispiel #1
0
        public List <Organisation> GetOrganisations()
        {
            var organisations = _context.Set <Organisation>()
                                .ToList();

            return(organisations);
        }
Beispiel #2
0
        public List <OrganisationManager> getDeletedOrganisationManagers(bool deleted)
        {
            var orgmagr = _context.Set <OrganisationManager>()
                          .Where(x => x.isDeleted == deleted)
                          .ToList();

            return(orgmagr);
        }
Beispiel #3
0
        public Department GetTop1Department(string dep, int orgId, bool del)
        {
            var department = _context.Set <Department>()
                             .Where(x => x.DepartmentName == dep && x.OrganisationID == orgId && x.isDeleted == del)
                             .ToList();

            return(department.LastOrDefault());
        }
Beispiel #4
0
        public DepartmentManager GetSpecificDepartmentManager(int depid, int empId, bool del)
        {
            var depMan = _context.Set <DepartmentManager>()
                         .Where(x => x.DepartmentID == depid && x.ManagerID == empId && x.isDeleted == del)
                         .ToList();

            return(depMan.LastOrDefault());
        }
Beispiel #5
0
        public UserAddress GetUserAddress(int userID)
        {
            var userAdd = _context.Set <UserAddress>()
                          .Where(x => x.UserID == userID)
                          .Include(c => c.EmplonomyUser)
                          .Include(c => c.AddressType)
                          .Include(c => c.City)
                          .Include(c => c.Town)
                          .Include(c => c.Province)
                          .Include(c => c.Country)
                          .FirstOrDefault();

            return(userAdd);
        }
Beispiel #6
0
 public int CountAddressTypes()
 {
     return(_context.Set <AddressType>().Count());
 }
Beispiel #7
0
 public int CountSendSmsStatuss()
 {
     return(_context.Set <SendSmsStatus>().Count());
 }
Beispiel #8
0
        public List <T> FindMany(Expression <Func <T, bool> > predicate)
        {
            List <T> entities = _context.Set <T>().Where(predicate).ToList();

            return(entities);
        }
Beispiel #9
0
 public int CountProvisioned()
 {
     return(_context.Set <Provisioned>().Count());
 }
Beispiel #10
0
        public EmplonomyUser GetCompleteUserByEmail(string email)
        {
            var user = _context.Set <EmplonomyUser>()
                       .Where(x => x.EmailAddress == email && x.isDeleted == false)
                       .Include(d => d.Department)
                       .Include(p => p.PasswordQsBank)
                       .Include(sp => sp.SurveyResponses)
                       .Include(ua => ua.UserAddresses)
                       .Include(dm => dm.DepartmentManagers)
                       .Include(om => om.OrganisationManagers)
                       .FirstOrDefault();

            return(user);
        }
Beispiel #11
0
 public int CountRoles()
 {
     return(_context.Set <Role>().Count());
 }
Beispiel #12
0
 public int CountShortMessages()
 {
     return(_context.Set <ShortMessage>().Count());
 }
Beispiel #13
0
 public int CountLocations()
 {
     return(_context.Set <Location>().Count());
 }
Beispiel #14
0
 public int CountPasswordQsBanks()
 {
     return(_context.Set <PasswordQsBank>().Count());
 }