Example #1
0
        private async Task <IEnumerable <Upw> > FindUpwRecords()
        {
            IDbConnection       upwDatabase = new SqlConnection(ConfigurationManager.ConnectionStrings["UPW"].ConnectionString);
            IUpwAsyncRepository upwRepo     = new UpwAsyncRepository(upwDatabase);

            return(await upwRepo.FindAutoAgentId(txtClientKey.Text, txtClientLocationKey.Text));
        }
Example #2
0
        public async Task Find_Upw_Records_Test()
        {
            var sqlDbName = "Clair";
            IAsyncRepository <Upw> upwRepo = new UpwAsyncRepository(_upwDb);
            var upwRecords = await upwRepo.FindByName(sqlDbName);

            foreach (var item in upwRecords)
            {
                Console.WriteLine(item.UserName + " | " + item.SqlDb + " | " + item.SqlServer);
            }
        }
Example #3
0
        public async Task GetAutoAgentId_Test()
        {
            var clientKey           = "6922413B-7A61-46B1-83E7-8386AFCF6237";
            var clientLocationKey   = "2296F05B-A00A-480F-ACCD-2B1CAE2CB171";
            IUpwAsyncRepository upw = new UpwAsyncRepository(_upwDb);
            var upwRecords          = await upw.FindAutoAgentId(clientKey, clientLocationKey);

            foreach (var item in upwRecords)
            {
                Console.WriteLine(item.UserName);
            }
        }
Example #4
0
        public async Task <IEnumerable <Upw> > FindUpwRecords(string name)
        {
            IAsyncRepository <Upw> upwRepo = new UpwAsyncRepository(_db);

            try
            {
                return(await upwRepo.FindByName(name));
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #5
0
        public async Task <IEnumerable <Upw> > GetAutoAgentUserName(Upw upwRecord)
        {
            IAsyncRepository <Upw> upwRepo = null;

            try
            {
                upwRepo = new UpwAsyncRepository(_db);
                return(await upwRepo.Find(upwRecord));
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #6
0
        private async Task <IEnumerable <Upw> > GetAutoAgentIdRecord(IDbConnection db)
        {
            IUpwAsyncRepository upwRepo = new UpwAsyncRepository(db);

            try
            {
                var clientKey         = txtClientKey.Text;
                var clientLocationKey = txtClientLocationKey.Text;
                return(await upwRepo.FindAutoAgentId(clientKey, clientLocationKey));
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }