Exemplo n.º 1
0
        public static IEnumerable <Payment> GetSundryPaymentsFromDate(DateTime fromDate)
        {
            var db       = new LA_Entities();
            var payments = (from p in db.Payments where p.IsSundry && p.Timestamp >= fromDate orderby p.Timestamp descending, p.Account.Customer.Surname select p).ToList();

            return(payments);
        }
Exemplo n.º 2
0
        public List <Account> GetAccountsForCollection(DateTime collectionDay)
        {
            var db       = new LA_Entities();
            var accounts = (from a in db.Accounts
                            where a.Customer.Collector_Id == Id &&
                            (
                                (int)collectionDay.DayOfWeek == a.Customer.PreferredDay ||
                                collectionDay == a.NextPaymentDate
                            )
                            select a).ToList();

            return(accounts);
        }