Package com.rakaizsys.eims.view.templates

Examples of com.rakaizsys.eims.view.templates.TemplateTableModel


      return;

    try {
      List<EmployeePayment> payments = EIMSEmployeeController
          .getEmployeePayments(employee);
      TemplateTableModel model = (TemplateTableModel) PropertyUtils
          .getProperty(tablePayments, "model");
      List<SalaryPayment> salaryPayments = new ArrayList<SalaryPayment>();
      for (EmployeePayment payment : payments) {
        SalaryPayment salaryPayment = new SalaryPayment(payment);
        salaryPayments.add(salaryPayment);
      }
      model.setDbObjects((List)salaryPayments);
    } catch (Exception ex) {
      ViewUtil
          .showErrorMessage("Error: Cannot get employee payments", ex);
    }
  }
View Full Code Here


      Bill bill = new Bill();
      bill.setBillDate(new Date());
      bill.setCustomer((Customer) PropertyUtils.getProperty(dbObject,
          "customer"));
      bill.setName("Bill for customer : " + bill.getCustomer());
      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);
      params.put("BILL", bill);
      ViewUtil.showReport("reports/customer/RPORT_CUSTOMER_BILL.jasper",
          (List) model.getDbObjects(), params);
    } catch (Exception ex) {
      ViewUtil.showErrorMessage("Error: connot print bill", ex);
    } finally {
      try {
        SQLMapHolder.sqlMap.endTransaction();
View Full Code Here

TOP

Related Classes of com.rakaizsys.eims.view.templates.TemplateTableModel

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.