Package com.rakaizsys.eims.model.customer

Examples of com.rakaizsys.eims.model.customer.CustomerService


  }

  @Override
  protected void doNew() throws Exception {
    dbObject = new CustomerService();
    BeanUtils.setProperty(dbObject, "customer", cbCustomer
        .getSelectedItem());
    ((CustomerServiceTableModel) (tableServices.getModel()))
        .setDbObjects(new ArrayList<DBObject>());
View Full Code Here


      TemplateTableModel model = (TemplateTableModel) tableServices
          .getModel();
      SQLMapHolder.sqlMap.startTransaction();
      SQLMapHolder.sqlMap.insert("insertBill", bill);
      for (DBObject serv : model.getDbObjects()) {
        CustomerService service = (CustomerService) serv;
        BillItem billItem = new BillItem();
        billItem.setBill(bill);
        billItem.setQuantity(1);
        billItem.setPrice(service.getTotalCost());
        billItem.setItem(service.getService().getItem());
        bill.getBillItems().add(billItem);
        SQLMapHolder.sqlMap.insert("insertBillItem", billItem);
      }
      SQLMapHolder.sqlMap.commitTransaction();
      Map params = new HashMap(1);
View Full Code Here

    setColumns(COLUMNS);
  }

  @Override
  public Object getValueAt(int row, int col) {
    CustomerService customerService = (CustomerService) dbObjects.get(row);
    switch (col) {
    case 0 : return null;
    case 1:
      return customerService.getId();
    case 2:
      return customerService.getName();
    case 3:
      return customerService.getCustomer();
    case 4:
      return customerService.getService();
    case 5:
      return customerService.getServiceDate();
    case 6:
      return customerService.getPrice();
    case 7:
      return customerService.getCharge();
    case 8:
      return customerService.getFees();
    case 9:
      return customerService.getNotes();
    default:
      return null;
    }
  }
View Full Code Here

    return true;
  }

  @Override
  public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
    CustomerService customerService = (CustomerService) dbObjects
        .get(rowIndex);
    switch (columnIndex) {
    case 4:
      Service service = (Service) aValue;
      customerService.setService(service);
      fireTableDataChanged();
      break;
    case 5 : customerService.setServiceDate((Date)aValue);
    break;
    case 6:
      customerService.setPrice(Double.parseDouble(aValue.toString()));
      break;
    case 7:
      customerService.setCharge(Double.parseDouble(aValue.toString()));
      break;
    case 8:
      customerService.setFees(Double.parseDouble(aValue.toString()));
      break;
    case 9:
      customerService.setNotes((String) aValue);
      break;
    case 0:
      if ("Delete".equals(aValue) && rowIndex > 0)
        removeDBObject(customerService);
      else if ("Add".equals(aValue))
        addDBObject(new CustomerService());
    default:
      break;
    }
  }
View Full Code Here

TOP

Related Classes of com.rakaizsys.eims.model.customer.CustomerService

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.