public ActionResult Edit(Card card) { var entity = Cards.First(x => x.Id == card.Id); entity.Name = card.Name; entity.Phone = card.Phone; TriggerContext.Current.Parent(x => x.RaiseEvent("body", "reload-table", null).FancyClose()); return View(); }
public ActionResult Create(Card card) { var id = Cards.Max(x => x.Id); card.Id = id + 1; Cards.Add(card); TriggerContext.Current.Parent(x => x.RaiseEvent("body", "reload-table", null).FancyClose()); return View("Edit"); }
public ActionResult Create() { var entity = new Card(); return View("Edit", entity); }