Exemple #1
0
        Company ICRUDCompany.GetCompany(string companyname)
        {
            Company company = new Company();
            var     context = new PayohteeDbContext(options: new DbContextOptions <PayohteeDbContext>());

            return(null);
        }
Exemple #2
0
        /// <summary>
        /// Get Company List (Suggestive)
        /// </summary>
        /// <value>
        /// Value comes from UI input and wildcard search on all elements in list
        /// </value>
        public List <string> GetAsyncListCompanyName(string c)
        {
            var           context = new PayohteeDbContext(options: new DbContextOptions <PayohteeDbContext>());
            List <string> list    = (from a in context.DbContextCompany.Where(x => x.CompanyName.Contains(c))
                                     select a.CompanyName).ToList();

            return(list);
        }
Exemple #3
0
        public void GetEmployeePayRate(Employee employee)
        {
            var payrate = new PayRate();
            var context = new PayohteeDbContext(null);

            try
            {
                //var employeeresult = context.DbContextCustomsOfficers.Find(employee.EmployeeId);
                //if (employeeresult == null)
                //{
                //    this.PayRate = 0;
                //}
                //else
                //{
                //    var rateresult = context.DbContextCustomsRate.Where(x => x.RateCode == employeeresult.RateCode).Single();
                //    this.PayRate = rateresult.RateAmount;
                //}
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
Exemple #4
0
 public void GetCompany(string companyname)
 {
     var           context = new PayohteeDbContext(options: new DbContextOptions <PayohteeDbContext>());
     List <string> list    = (from a in context.DbContextCompany.Where(x => x.CompanyName.Contains(companyname))
                              select a.CompanyName).ToList();
 }