private void DataPortal_Fetch(CredentialsCriteria criteria)
 {
     ExceptionManager.Process(() =>
     {
         using (var repository = new Repository())
         {
             var user = repository.GetUser(criteria.UserName);
             if (user != null && user.UserPassword == criteria.Password)
             {
                 LoadProperty(UserIdProperty, user.UserID);
                 Name            = user.UserLogin;
                 Roles           = new MobileList <string>(new string[] { user.UserRole });
                 IsAuthenticated = true;
             }
         }
     });
 }
Exemple #2
0
        private void DataPortal_Fetch(CredentialsCriteria criteria)
        {
            ExceptionManager.Process(() =>
            {
                using (var repository = new Repository())
                {
                    var user = repository.GetUser(criteria.UserName);
                    if (user != null && user.UserPassword == criteria.Password)
                    {
                        LoadProperty(UserIdProperty, user.UserID);
                        Name = user.UserLogin;
                        Roles = new MobileList<string>(new string[] { user.UserRole });
                        IsAuthenticated = true;
                    }

                }
            });
        }