コード例 #1
0
        public async Task <IHttpActionResult> ResetPin(ResetPinModel model)
        {
            try
            {
                int valuePin;
                var checkTry = int.TryParse(model.nuovo_pin, out valuePin);
                if (!checkTry)
                {
                    return(BadRequest("Il pin deve contenere solo cifre numeriche"));
                }

                if (model.nuovo_pin.Length != 4)
                {
                    return(BadRequest("Il PIN dev'essere un numero di massimo 4 cifre!"));
                }

                await _logicPersone.ResetPin(model);

                return(Ok("OK"));
            }
            catch (Exception e)
            {
                Log.Error("ResetPin", e);
                return(ErrorHandler(e));
            }
        }
コード例 #2
0
        public async Task ResetPin(ResetPinModel model)
        {
            await _unitOfWork.Persone.SavePin(model.PersonaUId,
                                              EncryptString(model.nuovo_pin, AppSettingsConfiguration.masterKey),
                                              true);

            await _unitOfWork.CompleteAsync();
        }
コード例 #3
0
 /// <summary>
 ///Method to verify
 /// </summary>
 private void VerifiedOk()
 {
     ValidateControls();
     if (_isValidatedAuth == true && _isValidatedPin == true)
     {
         if (Utilities.IsConnectedToNetwork())
         {
             DisplaySignUpPin = App.resetLoginPIN;
             LoginEmail       = App.LoginEmailId;
             ResetPinModel    = new ResetPinModel(this);
         }
         else
         {
             IsNoInternetPopupOpen = true;
             HitVisibility         = false;
         }
     }
 }