예제 #1
0
파일: MainForm.cs 프로젝트: h3yTr0uble/epam
        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();
            }
        }
예제 #2
0
        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);
 }