Package nu.lazy8.ledger.jdbc

Examples of nu.lazy8.ledger.jdbc.DataConnection


   * @param  view  Description of the Parameter
   */
  public AllReports(View view) {
    EditBus.addToBus(this);
    this.view = view;
    DataConnection dc = DataConnection.getInstance(view);
    if (dc == null || !dc.bIsConnectionMade) {
      buttonExit();
      return;
    }
    nowSelectedReport = getTextReport(KNOWN_REPORT_BALANCE);
View Full Code Here


   * @param  view  Description of the Parameter
   */
  public PeriodForm(JFrame view) {
    super("periodform", view, "lazy8ledger-accountingperiods");

    DataConnection dc = DataConnection.getInstance(view);
    if (dc == null || !dc.bIsConnectionMade) {
      Exit();
      return;
    }

View Full Code Here

            JOptionPane.PLAIN_MESSAGE);
        return false;
      }
    } catch (Exception e) {
    }
    DataConnection dc = DataConnection.getInstance(view);
    if (dc == null || !dc.bIsConnectionMade) {
      return false;
    }
    if (isUnique(new java.sql.Date(textField1.getTodaysDate().getTime()),
        new java.sql.Date(textField2.getTodaysDate().getTime()),
View Full Code Here

   * @param  views  Description of the Parameter
   */
  public GraphicsPane(View views) {
    super(views, "Diagram", "graphics", "lazy8ledger-graphics");
    view = views;
    DataConnection dc = DataConnection.getInstance(view);
    if (dc == null || !dc.bIsConnectionMade) {
      buttonExit();
      return;
    }

View Full Code Here


    //{{{ +reset(int, ArrayList) : void
    public void reset(int CompId, ArrayList accountGroups) {
      try {
        DataConnection dc = new DataConnection(null);
        Statement st = dc.con.createStatement();
        String select = "SELECT APP.Account.Account,AccDesc,TypeName,IsInBalanceReport " +
            "FROM APP.Account,AccountType WHERE AccountType.AccTypeId=APP.Account.IsAsset " +
            "AND AccountType.CompId=APP.Account.CompId AND AccountType.CompId=" +
            CompId + " ORDER BY APP.Account.Account";
        ResultSet rs = st.executeQuery(dc.filterSQL(select));
        numRows = 0;
        while (rs.next()) {
          numRows++;
        }
        rs.beforeFirst();
View Full Code Here

   * @param  view  Description of the Parameter
   */
  public TransactionTableForm(JFrame view) {
    super("transaction", view, "lazy8ledger-transaction");

    DataConnection dc = DataConnection.getInstance(view);
    if (dc == null || !dc.bIsConnectionMade) {
      Exit();
      return;
    }
    boolean bIsFastEntry = true;
View Full Code Here

    // Add all the components to the main panel.
    jPanel1.add(queryAggregate);
    //we are letting this table be invisable for now
    //        add(tableAggregate,BorderLayout.CENTER);

    DataConnection dc = DataConnection.getInstance(view);
    if (dc == null || !dc.bIsConnectionMade) {
      buttonExit();
      return;
    }
    dataBase = new JDBCAdapter(dc.con);
View Full Code Here

        printer = new ExcelCSVPrinter(out);
      } else {
        printer = new CSVPrinter(out);
      }
      printer.changeDelimiter(delimiter);
      DataConnection dc = DataConnection.getInstance(view);
      if (dc == null || !dc.bIsConnectionMade) {
        return;
      }
      Statement st = dc.con.createStatement();
      ResultSet rs = st.executeQuery(dc.filterSQL(sSelectString));
      ResultSetMetaData rsmd = rs.getMetaData();
      if (rsmd == null) {
        return;
      }
      int iNumColumns = rsmd.getColumnCount();
View Full Code Here

  protected StringBuffer processFile(boolean testOnly) {
    StringBuffer resultMessage = new StringBuffer();
    if (!isAllRequiredFieldsMatched()) {
      return resultMessage;
    }
    DataConnection dc = DataConnection.getInstance(view);
    if (dc == null || !dc.bIsConnectionMade) {
      return resultMessage;
    }
    //load from the file
    String[] line;
View Full Code Here

      tableAmountIndexes[INDEX_CREDIT] = -1;

      executeUpdate(group[0], saveFields, tableActivityIndexes,
          CompId, rowCount - group.length, "Activity2", sqlConnect, DataTypes, formatNumPane, resultMessage);
      try {
        DataConnection dc = DataConnection.getInstance(view);
        Statement st = dc.con.createStatement();
        st.executeUpdate(dc.filterSQL("DELETE FROM UniqNum WHERE CompId=" + CompId + " AND UniqName='Act_Id'"));
        st = dc.con.createStatement();
        st.executeUpdate(dc.filterSQL(
            "INSERT INTO UniqNum (CompId,UniqName,LastNumber) VALUES (" +
            CompId + ",'Act_Id'," + act_id + ")"));
      } catch (Exception e) {
        resultMessage.append("Failed to update the UniqNum table with the value act_id=" + act_id + "\n");
        Log.log(Log.ERROR, this, "Failed to update the UniqNum table with the value act_id=" + act_id);
View Full Code Here

TOP

Related Classes of nu.lazy8.ledger.jdbc.DataConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.