Exemplo n.º 1
0
 public ActionResult Edit(Account toEdit)
 {
     _repository.Update(toEdit);
     return RedirectToAction("Index");
 }
Exemplo n.º 2
0
 public void Should_link_account_to_multiple_debits()
 {
     var account = new Account("Test");
     account.Debits.Add(new Debit("Test1", "02/02/2012", 22.00));
     account.Debits.Add(new Debit("Test2", "02/02/2012", 27.00));
     _repo.AddNew(account);
     var retrieved = _repo.GetByName("Test");
     retrieved.Debits.FirstOrDefault(d=>d.Name == "Test1").Amount.ShouldBe(22.00);
     retrieved.Debits.FirstOrDefault(d => d.Name == "Test2").Amount.ShouldBe(27.00);
 }
Exemplo n.º 3
0
 public PartialViewResult AddNew()
 {
     var toCreate = new Account("");
     return PartialView("Edit", toCreate);
 }