示例#1
0
        public ActionResult Create()
        {
            UserAdminCreate user = new UserAdminCreate()
            {
                Password = DateTime.UtcNow.GetHashCode().ToString()
            };

            return(View(user));
        }
示例#2
0
        public ActionResult Create(UserAdminCreate userDetails)
        {
            if (!ModelState.IsValid)
            {
                return(View(userDetails));
            }

            User            user;
            string          password;
            ContractAddress address;

            userDetails.Split(out user, out password, out address);

            if (actions.Create(user, password, address).Succeeded)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View(userDetails));
            }
        }