Exemplo n.º 1
0
 private void updateCompleted(object sender, UpdateTLUSERCompletedEventArgs e)
 {
     try
     {
         if (e.Result.Result.Equals("0"))
         {
             this.IsApproved = Visibility.Collapsed.ToString();
             this.OnPropertyChanged("IsApproved");
             this.messagePop.Successful(ValidatorResource.UpdateSuccessful);
         }
         else
         {
             this.currentUser.AUTH_STATUS = this.preAuthStatus;
             this.messagePop.SetSingleError(ValidatorResource.ErrorUpdate + "\n " + e.Result.ErrorDesc);
         }
     }
     catch (Exception)
     {
         this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
     }
     finally
     {
         MyHelper.IsFree();
     }
 }
Exemplo n.º 2
0
 private void changePassCompleted(object sender, UpdateTLUSERCompletedEventArgs e)
 {
     try
     {
         if (e.Result.Result.Equals("0"))
         {
             this.IsErrorVisible = Visibility.Collapsed.ToString();
             this.OnPropertyChanged("IsErrorVisible");
             this.IsChangeAccount = Visibility.Collapsed.ToString();
             this.OnPropertyChanged("IsChangeAccount");
             IsolatedStorageSettings.ApplicationSettings["UserLogin"] = CurrentSystemLogin.CurrentUser;
         }
         else
         {
             CurrentSystemLogin.CurrentUser.Password    = MD5.GetMd5String(this.CurrentPass);
             CurrentSystemLogin.CurrentUser.ISFIRSTTIME = this.preFirsTime;
             this.ErrorMessage   = ValidatorResource.lblErrorChange;
             this.IsErrorVisible = Visibility.Visible.ToString();
             this.OnPropertyChanged("IsErrorVisible");
             this.OnPropertyChanged("ErrorMessage");
         }
     }
     catch (Exception)
     {
         CurrentSystemLogin.CurrentUser.Password    = MD5.GetMd5String(this.CurrentPass);
         CurrentSystemLogin.CurrentUser.ISFIRSTTIME = this.preFirsTime;
     }
     finally
     {
         MyHelper.IsFree();
     }
 }
Exemplo n.º 3
0
 private void changePassCompleted(object sender, UpdateTLUSERCompletedEventArgs e)
 {
     try
     {
         if (e.Result.Result.Equals("0"))
         {
             this.IsErrorVisible = Visibility.Collapsed.ToString();
             this.OnPropertyChanged("IsErrorVisible");
             this.IsChangeAccount = Visibility.Collapsed.ToString();
             this.OnPropertyChanged("IsChangeAccount");                    
             IsolatedStorageSettings.ApplicationSettings["UserLogin"] = CurrentSystemLogin.CurrentUser;                    
         }
         else
         {                    
             CurrentSystemLogin.CurrentUser.Password = MD5.GetMd5String(this.CurrentPass);
             CurrentSystemLogin.CurrentUser.ISFIRSTTIME = this.preFirsTime;
             this.ErrorMessage = ValidatorResource.lblErrorChange;
             this.IsErrorVisible = Visibility.Visible.ToString();
             this.OnPropertyChanged("IsErrorVisible");
             this.OnPropertyChanged("ErrorMessage");
         }
     }
     catch (Exception)
     {
         CurrentSystemLogin.CurrentUser.Password = MD5.GetMd5String(this.CurrentPass);
         CurrentSystemLogin.CurrentUser.ISFIRSTTIME = this.preFirsTime;
     }
     finally
     {
         MyHelper.IsFree();
     }
 }