public async void Get_Portal_Users_ByLocationId_Test()
        {
            int locationId = 153;
            IAsyncRepository <PortalUser> portalRepo = new PortalUsersAsyncRepository(Database);
            var portalUsers = await portalRepo.FindWithIdAsync(locationId);

            foreach (var item in portalUsers)
            {
                Console.WriteLine(item.Username.DecryptStringBase64() + " Password: "******" Portal Id: " + item.Portal_Id);
            }
        }
예제 #2
0
        //public async Task<IEnumerable<FacilityDetail>> GetFacilityDetails(Guid facilityKey)
        //{
        //    IAsyncRepository<FacilityDetail> facilityDetialsRepo = new FacilityDetialsAsyncRepository(_db);
        //    try
        //    {
        //        return  await facilityDetialsRepo.FindWithGuidAsync(facilityKey);
        //    }
        //    catch (Exception)
        //    {

        //        throw;
        //    }

        //}

        public async Task <IEnumerable <PortalUser> > GetPortalUsersWithLocationd(int id)
        {
            IAsyncRepository <PortalUser> portalUsersRepo = new PortalUsersAsyncRepository(_db);

            try
            {
                return(await portalUsersRepo.FindWithIdAsync(id));
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #3
0
        private async Task GetPortalUsers(IDbConnection db)
        {
            try
            {
                IAsyncRepository <PortalUser> portalUserRepo = new PortalUsersAsyncRepository(db);
                lblStatus.Text = "Getting Portal Users";
                var portalUsers = await portalUserRepo.FindWithIdAsync(LocationId);

                var decryptedPortalUsers = DecryptBase64PortalUsers(portalUsers);
                PortalUsersToDataGridView(decryptedPortalUsers);
                lblStatus.Text = "Done";
            }
            catch (SqlException)
            {
                throw;
            }
        }