Package nu.lazy8.ledger.jdbc

Examples of nu.lazy8.ledger.jdbc.JdbcTable$AllRowsTable


      getContentPane().add(centerPanel, BorderLayout.CENTER);
 
      HelpedLabel label1 = new HelpedLabel(Translator.getTranslation("Company"), "company", helpFile, view);
      centerPanel.add(label1);
 
      comboBox = new DataComboBox(new JdbcTable("Company", 1, view), false, "company", helpFile, view);
      comboBox.setMaximumSize(new Dimension(accountNameFieldSize, accountNameFieldSize));
      comboBox.setMinimumSize(new Dimension(accountNameFieldSize / 2, 1));
      centerPanel.add(comboBox);
 
      comboBox.loadComboBox("Name", "CompId", new Integer(0));
      comboBox.addItem("--- " + Translator.getTranslation("All") + " ---");
      //select the default company
      JdbcTable aa = new JdbcTable("Company", 1, view);
      try {
        aa.setObject(new Integer(
            SetupInfo.getProperty(SetupInfo.DEFAULT_COMPANY)),
            "CompId");
        if (aa.GetFirstRecord()) {
          comboBox.setSelectedItemFromKey((Integer)
              aa.getObject("CompId", null));
        }
      } catch (Exception ex) {
        comboBox.setSelectedItem("");
        /*
         *  just clear the dialog
View Full Code Here


      sb.append(
          " AND Customer2.CustId=" +
          customerComboBox.getSelectedItemsKey().toString());
    }
    sb.append(" AND Amount.Customer<>0 ORDER BY Customer2.CustName,Amount.Account,Amount.Act_id, IsDebit");
    JdbcTable db = new JdbcTable(sb.toString(), view, new int[]{Types.DATE, Types.DATE, Types.INTEGER, Types.INTEGER, Types.INTEGER});
    try {
      //invoice date
      db.setObject(new java.sql.Date(
          jTextField1.getDate().getTime()),
          Types.DATE);
      db.setObject(new java.sql.Date(
          jTextField2.getDate().getTime()),
          Types.DATE);
      if (intField1 != null && intField2 != null && intField1.getText().length() != 0 && intField2.getText().length() != 0 &&
          intField2.getInteger().intValue() >= intField1.getInteger().intValue()) {
        db.setObject(intField1.getInteger(), Types.INTEGER);
        db.setObject(intField2.getInteger(), Types.INTEGER);
      }
    } catch (Exception e) {
      Log.log(Log.DEBUG, this, "Error trying to execute sql=" + sb.toString());
      Log.log(Log.DEBUG, this, "Error =" + e);
      return null;
View Full Code Here

    super.getSpecialGuiPane(jPanel1);

    JLabel label2 = new HelpedLabel(Translator.getTranslation("Customer"),
        "Customer", "allreports", view);
    jPanel1.add(label2);
    customerComboBox = new DataComboBox(new JdbcTable(
        "SELECT CompId,CustId,CustName FROM Customer2 WHERE CompId=? ORDER BY CustName"
        , view, new int[]{Types.INTEGER}), true, "Customer", "allreports", view);
    customerComboBox.setMaximumSize(new Dimension(accountNameFieldSize, accountNameFieldSize));
    customerComboBox.setMinimumSize(new Dimension(accountNameFieldSize / 2, 1));
    customerComboBox.loadComboBox("CustName", "CustId", (Integer) cc.comboBox.getSelectedItemsKey());
View Full Code Here

          startNum=rs.getInt("id")+1;
        }
        st.close();
      }catch(Exception e){
      }
      UniqNumGenerator a = new UniqNumGenerator();
      accountTypeAccess.setObject(
          new Integer(a.GetUniqueNumber("AccTypeId", startNum, 999999999,
          (Integer) cc.comboBox.getSelectedItemsKey())), "AccTypeId");
    } else {
      getCustomerId(i++);
    }
    accountTypeAccess.setObject(textField2.getText(), "TypeName");
View Full Code Here

  /**
   *  Description of the Method
   */
  public void AfterGoodDelete() {
    super.AfterGoodDelete();
    EditBus.send(new AccountListChanged(this, "no parameters"));
  }//}}}
View Full Code Here

  }//}}}

  //{{{ +AfterGoodChange() : void
  public void AfterGoodChange() {
    super.AfterGoodChange();
    EditBus.send(new AccountListChanged(this, "no parameters"));
    wasWriteOk = true;
    if (parent != null && bIsAddOnly) {
      parent.setVisible(false);
    }
  }//}}}
View Full Code Here

  /**
   *  Description of the Method
   */
  public void AfterGoodWrite() {
    super.AfterGoodWrite();
    EditBus.send(new AccountListChanged(this, "no parameters"));
    wasWriteOk = true;
    if (parent != null && bIsAddOnly) {
      parent.setVisible(false);
    }
  }//}}}
View Full Code Here

  /**
   *  Description of the Method
   */
  public void AfterGoodDelete() {
    super.AfterGoodDelete();
    EditBus.send(new AccountTypeListChanged(this, "no parameters"));
  }//}}}
View Full Code Here

  }//}}}

  //{{{ +AfterGoodChange() : void
  public void AfterGoodChange() {
    super.AfterGoodChange();
    EditBus.send(new AccountTypeListChanged(this, "no parameters"));
  }//}}}
View Full Code Here

  /**
   *  Description of the Method
   */
  public void AfterGoodWrite() {
    super.AfterGoodWrite();
    EditBus.send(new AccountTypeListChanged(this, "no parameters"));
  }//}}}
View Full Code Here

TOP

Related Classes of nu.lazy8.ledger.jdbc.JdbcTable$AllRowsTable

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.