Esempio n. 1
0
 public TransactionItem(Recurring recur)
 {
     Amount = recur.Amount;
     Description = recur.Description;
     CreatedDate = recur.StartDate;
     IsStartAmount = false;
 }
 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);
 }
        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);
        }