Package org.jabusuite.address.customer.session

Examples of org.jabusuite.address.customer.session.CustomersRemote


    public void doSave() throws EJbsObject {
        if (logger.isDebugEnabled()) {
            logger.debug("Saving data...");
        }
        try {
            CustomersRemote customers = (CustomersRemote)ClientTools.getRemoteBean(CustomersRemote.class);

            //this.getControlData();
            super.doSave();
            logger.debug(getCustomer().isDeleted());

            if (this.getDlgState() == DlgState.dsInsert) {
                System.out.println("Adding new entity");
                customers.createDataset(this.getCustomer(), ClientGlobals.getUser(), ClientGlobals.getCompany());
            } else if (this.getDlgState() == DlgState.dsEdit) {
                System.out.println("Saving exisiting entity.");
                customers.updateDataset(this.getCustomer(), ClientGlobals.getUser());
            }
            System.out.println("Entity saved.");

        } catch (NamingException e) {
            e.printStackTrace();
View Full Code Here


        Customer customer = (Customer) jbsBaseObject;
        //We have to get the positions from the database also
        if ((customer != null) && (this.getDlgState() == DlgState.dsEdit)) {
            logger.debug("Retrieving data for customer " + customer.getId());
            try {
                CustomersRemote customers = (CustomersRemote) ClientTools.getRemoteBean(CustomersRemote.class);
                Customer existingCustomer = customers.findDataset(customer.getId(), true);
                customer = existingCustomer;
            } catch (NamingException e) {
                logger.error("Error retrieving offer.", e);
            }
        }
View Full Code Here

        return new PlCustomers(ClientGlobals.getUser(), ClientGlobals.getCompany());
    }

    @Override
    public void doDeleteJbsObject(JbsBaseObject jbsObject) throws Exception {
        CustomersRemote custManagement = (CustomersRemote)ClientTools.getRemoteBean(CustomersRemote.class);
        custManagement.deleteDataset((Customer)jbsObject, ClientGlobals.getUser());
    }
View Full Code Here

            case CT_CONTACT :
                ContactsRemote contactManagement = (ContactsRemote)ClientTools.getRemoteBean(ContactsRemote.class);
                this.setContacts(contactManagement.getDatasets(filter, "a.name1, a.name2, a.name3", ClientGlobals.getUser(), ClientGlobals.getCompany(), 0, 0));
                break;
            case CT_CUSTOMER :
                CustomersRemote customerManagement = (CustomersRemote)ClientTools.getRemoteBean(CustomersRemote.class);
                this.setContacts(customerManagement.getDatasets(filter, "a.name1, a.name2, a.name3", ClientGlobals.getUser(), ClientGlobals.getCompany(), 0, 0));
                break;
            case CT_EMPLOYEE :
                EmployeesRemote employeeManagement = (EmployeesRemote)ClientTools.getRemoteBean(EmployeesRemote.class);
                this.setContacts(employeeManagement.getDatasets(filter, "a.name1, a.name2, a.name3", ClientGlobals.getUser(), ClientGlobals.getCompany(), 0, 0));
                break;
View Full Code Here

TOP

Related Classes of org.jabusuite.address.customer.session.CustomersRemote

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.