Beispiel #1
0
        protected override async void Next(object param)
        {
            MsgVis = false;

            if (validator.IsCorrect)
            {
                IsSplashVisible = true;
                registerService.SetupPass(Phone, PasswordBox.Password);

                int id = await registerService.RegisterAsync();

                IsSplashVisible = false;

                if (id > -1)
                {
                    registerService.Clear();
                    pageservice.Next();
                }
                else
                {
                    MsgVis = true;
                    Msg    = registerService.ErrorMessage;
                }
            }
            else
            {
                MsgVis = true;
                Msg    = validator.ErrorMessage;
            }
        }
Beispiel #2
0
        public async Task <JsonResult> RegisterAsync([FromBody] UserRegisterRequestDto userDto)
        {
            var(token, error) = await _registerService.RegisterAsync(userDto);

            return(error == null?Json(token)
                       : Json(new { Error = error }));
        }