Example #1
0
        public ActionResult CreateUser(string userName, string userPassword, string userQuestion, string userAnswer)
        {
            var operationStatusCode = User.Create(userName, userPassword, userAnswer, userQuestion);

            if (operationStatusCode == "200")
            {
                return(RedirectToAction("Index", "Chats"));
            }
            else
            {
                ModelState.AddModelError(string.Empty, operationStatusCode);
                return(View(User.GetQuestions()));
            }
        }