Package event_manager.models

Examples of event_manager.models.Client


     * Sets client to edit.
     *
     * @param client client to return
     */
    public void setClient(Client client) {
        Client oldClient = this.client;
        this.client = client;
        firePropertyChange("client", oldClient, client);
    }
View Full Code Here


                break;
            case ViewHelper.LIST_STAFF:
                panel = new ListPanel(new StaffsController(), new Staff(), this);
                break;
            case ViewHelper.LIST_CLIENT:
                panel = new ListPanel(new ClientsController(), new Client(), this);
                break;
            default:
                ViewHelper.showDialog("I don't know that panel");
        }
        mainTabbedPane.add(panel);
View Full Code Here

        view.show(panelName, ViewHelper.LIST_CLIENT);
    }

    @Override
    public void createNew(View view) {
        new ClientForm(view, true, new Client()).setVisible(true);
    }
View Full Code Here

    public boolean save(View view, Model model) {
        DBHelper.openConnection();

        boolean saved = false;
        String errors = "";
        Client client = (Client) model;

        if(client.save()) {
            saved = true;
        } else {
            errors += DBHelper.getNiceErrors(model);
        }
View Full Code Here

    }

    @Override
    public void show(View view, int modelId) {
        DBHelper.openConnection();
        Client client = Client.findById(modelId);
        new Show(view, true, client).setVisible(true);
        DBHelper.closeConnection();
    }
View Full Code Here

    }
   
    @Override
    public void edit(View view, int modelId) {
        DBHelper.openConnection();
        Client client = Client.findById(modelId);
        new ClientForm(view, true, client).setVisible(true);
        DBHelper.closeConnection();
    }
View Full Code Here

    @Override
    public boolean delete(View view, int modelId) {
        boolean deleted = false;
        DBHelper.openConnection();
        Client client = Client.findById(modelId);
        if(client.delete()) {
            ViewHelper.showDialog("Deleted!");
            deleted = true;
        } else {
            ViewHelper.showDialog("Error deleting!");
        }
View Full Code Here

TOP

Related Classes of event_manager.models.Client

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.