public bool CheckUserName(string username) { _objDBGateway = new DatabaseGateway(_dbType); int result = 0; try { string query = "select count(*) from TB_Login where USERNAME='******'"; result = _objDBGateway.ExecuteScalar <int>(query); if (result > 0) { isSuccess = true; } else { isSuccess = false; } } catch (Exception ex) { throw; } return(isSuccess); }
public bool Login(UserEntity entity) { _objDBGateway = new DatabaseGateway(_dbType); int result = 0; try { string query = "select count(*) from TB_Login where USERNAME='******' and PASSWORD='******'"; result = _objDBGateway.ExecuteScalar <int>(query); if (result > 0) { isSuccess = true; } else { isSuccess = false; } } catch (Exception ex) { throw; } return(isSuccess); }