Exemplo n.º 1
0
 public TransactionItem(Recurring recur)
 {
     Amount = recur.Amount;
     Description = recur.Description;
     CreatedDate = recur.StartDate;
     IsStartAmount = false;
 }
Exemplo n.º 2
0
 public ActionResult Edit(Recurring recurring)
 {
     if (ModelState.IsValid)
     {
         recurring.AccountID = 1;
         db.Entry(recurring).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(recurring);
 }
Exemplo n.º 3
0
        public ActionResult Create(Recurring recurring)
        {
            if (ModelState.IsValid)
            {
                recurring.AccountID = 1;
                recurring.StartDate.AddHours(6);
                db.Recurrings.Add(recurring);
                db.SaveChanges();

                return RedirectToAction("Index");
            }

            return View(recurring);
        }