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

            return(null);
        }
コード例 #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);
        }
コード例 #3
0
ファイル: Payment.cs プロジェクト: sguz3m4n/POT
        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;
            }
        }
コード例 #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();
 }