Examples of VOListTableModel


Examples of org.openswing.swing.table.model.client.VOListTableModel

        return;
      }

      // check if there exists a scheduled employee that has not a task with a sale activity code linked...
      DetailCallOutRequestVO vo = (DetailCallOutRequestVO)frame.getCalloutPanel().getVOModel().getValueObject();
      VOListTableModel model = frame.getResourcesPanel().getTasksGrid().getVOListTableModel();
      ScheduledEmployeeVO empVO = null;
      ArrayList tasks = null;
      TaskVO taskVO = null;
      Response res = null;
      HashMap map = new HashMap();
      map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      for(int i=0;i<model.getRowCount();i++) {
        empVO = (ScheduledEmployeeVO)model.getObjectForRow(i);
        res = ClientUtils.getData("validateTaskCode",new LookupValidationParams(empVO.getTaskCodeREG07(),map));
        if (res.isError()) {
          JOptionPane.showMessageDialog(
               ClientUtils.getParentFrame(frame),
               ClientSettings.getInstance().getResources().getResource(res.getErrorMessage()),
View Full Code Here

Examples of org.openswing.swing.table.model.client.VOListTableModel

   * Method called by the Form panel to insert new data.
   * @param newValueObject value object to save
   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is successfully completed
   */
  public Response insertRecord(ValueObject newPersistentObject) throws Exception {
    VOListTableModel gridModel = detailFrame.getGrid().getVOListTableModel();
    if (gridModel.getRowCount()<1) {
      return new ErrorResponse("you must insert al least one row");
    }

    JournalHeaderWithVatVO jhVO = (JournalHeaderWithVatVO)newPersistentObject;
    jhVO.getJournalRows().clear();
    JournalRowVO jrVO = null;
    JournalRowWithVatVO rowVatVO = null;
    VatRowVO vatVO = null;
    BigDecimal vatValue = null;
    BigDecimal totalValue = new BigDecimal(0);
    for(int i=0;i<gridModel.getRowCount();i++) {
      // create 3 rows for each vat row value object...
      rowVatVO = (JournalRowWithVatVO)gridModel.getObjectForRow(i);

      // 1. add taxable income to the accounting item...
      jrVO = new JournalRowVO();
      jrVO.setCompanyCodeSys01ACC06(jhVO.getCompanyCodeSys01ACC05());
      jrVO.setAccountCodeAcc02ACC06(rowVatVO.getAccountCodeAcc02ACC06());
View Full Code Here

Examples of org.openswing.swing.table.model.client.VOListTableModel

    instalmentsGrid.setController(new GridController() {

      public Response updateRecords(int[] rowNumbers,ArrayList oldPersistentObjects,ArrayList persistentObjects) throws Exception {
        // verify percentage total...
        VOListTableModel model = instalmentsGrid.getVOListTableModel();
        PaymentInstalmentVO vo = null;
        double tot = 0;
        for(int i=0;i<model.getRowCount();i++) {
          vo = (PaymentInstalmentVO)model.getObjectForRow(i);
          tot += vo.getPercentageREG17().doubleValue();
        }
        if (tot!=100d) {
          return new ErrorResponse("the sum of percentages must be 100");
        }
View Full Code Here

Examples of org.openswing.swing.table.model.client.VOListTableModel

   * Method called by the Form panel to insert new data.
   * @param newValueObject value object to save
   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is successfully completed
   */
  public Response insertRecord(ValueObject newPersistentObject) throws Exception {
    VOListTableModel gridModel = detailFrame.getGrid().getVOListTableModel();
    if (gridModel.getRowCount()<2) {
      return new ErrorResponse("you must insert al least two rows");
    }
    if (detailFrame.getControlSbil().getValue()!=null &&
        ((BigDecimal)detailFrame.getControlSbil().getValue()).doubleValue()!=0) {
      return new ErrorResponse("there is a lack of balance between debit and credit amounts");
    }

    JournalHeaderVO vo = (JournalHeaderVO)newPersistentObject;
    for(int i=0;i<gridModel.getRowCount();i++)
      vo.addJournalRow((JournalRowVO)gridModel.getObjectForRow(i));

    Response response = ClientUtils.getData("insertJournalItem",vo);
    if (!response.isError()) {
      JOptionPane.showMessageDialog(
          ClientUtils.getParentFrame(detailFrame),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.