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); } }
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); } }
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); } }
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); } }
partial void DeletewpUser(wpUser instance);
partial void UpdatewpUser(wpUser instance);
partial void InsertwpUser(wpUser instance);