コード例 #1
0
 public IList<PayrollPeriod> LoadAllPeriod()
 {
     using (var db = new pisidataContext())
     {
         var query = from p in db.tblMonths
                     where p.monClose.Equals(true)
                     select new PayrollPeriod() { Code = p.MonthID, Name = p.monName };
         
         return query.ToList();
     }
 }
コード例 #2
0
        public VerificationEmployee LoadByKey(string key)
        {
            using (var db = new pisidataContext())
            {
                var query = from p in db.tblEmployees
                            join v in db.tblUserVerifications on p.EmployeeID equals v.EmployeeId 
                            where v.VeryficationKey.Equals(key)
                            select new VerificationEmployee() { 
                                 EmployeeId =p.EmployeeID,
                                  Name =p.empName,
                                   Address =p.empAddress,
                                    BirthPlace =p.empBirthPlace,
                                      BirthDate =p.empBirthDate 
                            };

                return query.FirstOrDefault();
            }
        }