Пример #1
0
        public async Task CreateBillPay(NwbaContext nwbaContext)
        {
            var billPay = new BillPay
            {
                AccountNumber = Account,
                PayeeID       = Payee,
                Amount        = Amount,
                ScheduleDate  = ScheduledDate.ToUniversalTime(),
                ModifyDate    = DateTime.UtcNow
            };

            if (Period.Equals("S"))
            {
                billPay.Period = Models.Period.S;
            }
            if (Period.Equals("M"))
            {
                billPay.Period = Models.Period.M;
            }
            if (Period.Equals("Q"))
            {
                billPay.Period = Models.Period.Q;
            }
            if (Period.Equals("Y"))
            {
                billPay.Period = Models.Period.Y;
            }

            nwbaContext.BillPays.Add(billPay);
            await nwbaContext.SaveChangesAsync();
        }
Пример #2
0
 public bool IsDue()
 {
     return(ScheduledDate.ToUniversalTime() < DateTime.UtcNow);
 }