Package ke.go.moh.oec.reception.data

Examples of ke.go.moh.oec.reception.data.Department


    @Action
    public void reassign() {
        Object selectedItem = departmentNameComboBox.getSelectedItem();
        if (selectedItem != null) {
            Department reassignDepartment = (Department) selectedItem;
            selectedDepartment.setCode(reassignDepartment.getCode());
            selectedDepartment.setName(reassignDepartment.getName());
            selectedDepartment.setSelected(true);
            dispose();
        } else {
            showWarningMessage("Please select the department to which you want to reassign "
                    + "this notification.");
View Full Code Here


    @Action
    public void delete() {
        int selectedRow = departmentsTable.getSelectedRow();
        if (selectedRow != -1) {
            Department department = departmentList.get(selectedRow);
            if (showConfirmMessage("Are you sure you want to delete " + department.getName() + "?")) {
                try {
                    persistenceManager.deleteDepartment(department);
                    refreshDepartmentsTable(department, false);
                } catch (PersistenceManagerException ex) {
                    showErrorMessage("The following error occurred: " + ex.getMessage()
View Full Code Here

        }
        if (codeTextField.getText().isEmpty()) {
            showWarningMessage("Please type in the department code.", codeTextField);
            return;
        }
        Department department = new Department(nameTextField.getText(), codeTextField.getText());
        try {
            if (departmentList.contains(department)) {
                if (showConfirmMessage("Would you like to modify " + department.getName() + "?")) {
                    persistenceManager.modifyDepartment(department);
                }
            } else {
                persistenceManager.createDepartment(department);
                refreshDepartmentsTable(department, true);
View Full Code Here

    }

    @Action
    public void reassign() {
        try {
            Department department = new Department();
            ReassignDialog rd = new ReassignDialog(null, true, notificationDialogHelper.getClinicList(), department);
            rd.setLocationRelativeTo(this);
            rd.setVisible(true);
            if (department.isSelected()) {
                if (showConfirmMessage("Are you sure you want to reassign '" + notification.toString() + "' to "
                        + department.getName() + "?")) {
                    notification.setReassignAggress(department.getCode());
                    notificationDialogHelper.reassignWork(notification);
                    notification.setFlaggedOff(true);
                    dispose();
                }
            }
View Full Code Here

        RequestDispatcher.dispatch(createWork(notification), RequestDispatcher.DispatchType.REASSIGN, Server.CDS);
    }
   
    public List<Department> getClinicList() throws PersistenceManagerException {
        List<Department> clinicList = new ArrayList<Department>();
        clinicList.add(new Department("Siaya CCC", "ke.go.moh.facility.14080.tb.ccc"));
        clinicList.add(new Department("Siaya XYZ", "ke.go.moh.facility.14080.tb.xyz"));
        clinicList.add(new Department("Siaya ABC", "ke.go.moh.facility.14080.tb.abc"));
        return PersistenceManager.getInstance().getDepartmentList();
    }
View Full Code Here

        ResultSet resultSet = null;
        try {
            statement = this.getStatement();
            resultSet = statement.executeQuery("SELECT name, code FROM " + departmentTable);
            while (resultSet.next()) {
                departmentList.add(new Department(resultSet.getString("name"), resultSet.getString("code")));
            }
        } catch (SQLException ex) {
            Logger.getLogger(PersistenceManager.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            this.close(statement);
View Full Code Here

TOP

Related Classes of ke.go.moh.oec.reception.data.Department

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.