Beispiel #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));
        }
Beispiel #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);
            }
        }
Beispiel #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);
            }
        }
        public async Task <IEnumerable <Upw> > FindUpwRecords(string name)
        {
            IAsyncRepository <Upw> upwRepo = new UpwAsyncRepository(_db);

            try
            {
                return(await upwRepo.FindByName(name));
            }
            catch (Exception)
            {
                throw;
            }
        }
        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;
            }
        }
Beispiel #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;
            }
        }