예제 #1
0
 public bool authenticateUser(string username, string password)
 {
     try
     {
         wpUser u = this._context.wpUsers.Where(x => x.username.Equals(username)).SingleOrDefault();
         return(u.pwd.Equals(EncrytionFactory.Encrypt(password, AppStoreData.ENCRYTION_KEY)));
     }
     catch (Exception ex)
     {
         AppStoreData.APP_LOGGER.Error(ex);
         return(false);
     }
 }
예제 #2
0
        public bool insertUser(wpUser user)
        {
            try
            {
                this._context.wpUsers.InsertOnSubmit(user);
                this._context.SubmitChanges();

                return(true);
            }
            catch (Exception ex)
            {
                AppStoreData.APP_LOGGER.Error(ex);
                return(false);
            }
        }
예제 #3
0
        public bool encrytSavePassword(string username, string password)
        {
            try
            {
                wpUser u = this._context.wpUsers.Where(x => x.username.Equals(username)).SingleOrDefault();
                u.pwd = EncrytionFactory.Encrypt(password, AppStoreData.ENCRYTION_KEY);

                this._context.SubmitChanges();
                return(true);
            }
            catch (Exception ex)
            {
                AppStoreData.APP_LOGGER.Error(ex);
                return(false);
            }
        }
예제 #4
0
        public bool updateUser(wpUser user)
        {
            try
            {
                wpUser u = this._context.wpUsers.Where(x => x.username.Equals(user.username)).SingleOrDefault();
                u.name      = user.name;
                u.email     = user.email;
                u.lastupddt = DateTime.Now;

                this._context.SubmitChanges();

                return(true);
            }
            catch (Exception ex)
            {
                AppStoreData.APP_LOGGER.Error(ex);
                return(false);
            }
        }
예제 #5
0
 partial void DeletewpUser(wpUser instance);
예제 #6
0
 partial void UpdatewpUser(wpUser instance);
예제 #7
0
 partial void InsertwpUser(wpUser instance);