private void RegisterNewUser() { UserForm form = new UserForm(awards); if (form.ShowDialog(this) == DialogResult.OK) { users.Add(form.FirstName, form.LastName, form.Birthdate, form.UserAwards); DisplayUsers(); } }
public ActionResult Create(UserViewModel userModel) { try { users.Add(userModel.ToUser()); return(RedirectToAction("Index")); } catch { return(View()); } }
// POST: api/User public void Post(User user) { UserBL.Add(user); }