コード例 #1
0
  public void updateRequestHandler(String[] parameters) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      sql.updateUserDetails(parameters);
      sql.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #2
0
  public ResultSet getRequestHandler(String User) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      return (ResultSet) sql.authRequest(User);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
コード例 #3
0
  public void deleteTransaction(String[] rID) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      sql.deleteTransactions(rID);

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #4
0
  public ResultSet getTransactionHandler(String status, int critical, String payment) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      return (ResultSet) sql.authTransaction(status, critical, payment);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
コード例 #5
0
  public void updateTransactions(String rStatus, String[] rID) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      sql.updateTransactionData(rStatus, rID);

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #6
0
  public ResultSet getModDelHandler(String modifyStatus, String payment, int critical) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      return (ResultSet) sql.modifyDeleteTransaction(modifyStatus, payment, critical);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
コード例 #7
0
  public void declineRequestHandler(String newvalue, String columnname, String user) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      sql.declineRequestDatabase(newvalue, columnname, user);
      sql.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #8
0
  public void modifyTransaction(String[] rID, String status) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      sql.modifyTransactions(rID, status);

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #9
0
  public void rejectTransaction(String rStatus, double balance, String[] rID) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      sql.rejectTransactions(rStatus, balance, rID);

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #10
0
  public void requestModifyHandler(
      String user, String parameter, String parametertype, String usertype) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      sql.insertintoRequestDatabase(user, parameter, parametertype, usertype);
      sql.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #11
0
  public Double getSourceBalance(String accountNumber) {
    double result = 0.0;
    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      result = sql.getBalanceSourceAccount(accountNumber);

    } catch (Exception e) {
      e.printStackTrace();
    }
    return result;
  }
コード例 #12
0
  public Boolean checkAccountNumber(String accountNumber) {
    Boolean result = true;
    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      result = sql.checkValidAccount(accountNumber);

    } catch (Exception e) {
      e.printStackTrace();
    }
    return result;
  }
コード例 #13
0
  public Boolean checkSameSource(String[] rID) {
    boolean result = false;
    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      result = sql.checkSameSourceAccountNumber(rID);

    } catch (Exception e) {
      e.printStackTrace();
    }
    return result;
  }
コード例 #14
0
  public ResultSet checkRequestStatus(String rID) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      return (ResultSet) sql.checkStatus(rID);

    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
コード例 #15
0
  public Double getBalance(String[] rID) {
    double result = 0.0;
    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      result = sql.getBalanceAmount(rID);

    } catch (Exception e) {
      e.printStackTrace();
    }
    return result;
  }
コード例 #16
0
  public void approveModifySourceTransaction(
      Double newAmount, String rStatus, double balance, String[] rID) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      sql.approveModifySourceTransactions(newAmount, rStatus, balance, rID);

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #17
0
  public void deleteRequestHandler(String userName, String accountnumber) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {

      sql.deleteUserDetails(userName, accountnumber);
      sql.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #18
0
  public ArrayList<String> checkStatusOfId(String[] rID) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    ArrayList<String> status = new ArrayList<String>();
    try {
      status = sql.checkStatus(rID);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return status;
  }
コード例 #19
0
  public String getSourceAccount(String rID) {
    String result = "";
    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      result = sql.getSourceAccountNumber(rID);

    } catch (Exception e) {
      e.printStackTrace();
    }
    return result;
  }
コード例 #20
0
  public Object updateaccountrequest(String username, String manager, String Accountnumber) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      sql.insertAccountChangeRequest(username, manager, Accountnumber);
      sql.close();
    } catch (Exception e) {
      e.printStackTrace();
    }

    return null;
  }
コード例 #21
0
  public void updateCountHandler(int count, String Username) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {

      sql.updatecountDatabase(count, Username);
      sql.close();

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #22
0
  public void setloggedin(String Username) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {

      sql.setisloggeddb(Username);
      sql.close();

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #23
0
  public Object requestManagers() {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      Object obj = null;
      obj = (Object) sql.readSystemManagers();
      sql.close();
      return obj;
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
コード例 #24
0
  public ResultSet requestCountHandler() {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      ResultSet obj = null;
      obj = (ResultSet) sql.countRequestDatabase();
      sql.close();
      return obj;
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
コード例 #25
0
  public Object viewRequestHandler(String Manager) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      Object obj = null;
      obj = sql.viewRequestDatabase(Manager);
      sql.close();
      return obj;
    } catch (Exception e) {
      e.printStackTrace();
    }

    return null;
  }
コード例 #26
0
  public Object requestHandler(String userName, String parameterType) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      Object obj = null;
      obj = (Object) sql.readModifyUser(userName, parameterType);
      sql.close();
      return obj;

    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
コード例 #27
0
  public Object getaccounttypeHandler(String username, String accountnumber) {

    try {
      sql.getConnection();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }

    try {
      Object obj = null;
      obj = sql.readAccountType(username, accountnumber);
      sql.close();
      return obj;
    } catch (Exception e) {
      e.printStackTrace();
    }

    return null;
  }