Package nz.co.abrahams.asithappens.storage

Examples of nz.co.abrahams.asithappens.storage.DataSetsDAO


     */
    private void setDates(int sessionID) {
        long startTime, finishTime;
        GregorianCalendar startCalendar, finishCalendar;
        SimpleDateFormat dateFormat, timeFormat;
        DataSetsDAO dataSetsDAO;
       
        dateFormat = new SimpleDateFormat("dd/MM/yyyy");
        timeFormat = new SimpleDateFormat("H:mm:ss");
        startCalendar = new GregorianCalendar();
        finishCalendar = new GregorianCalendar();
       
        try {
            dataSetsDAO = DAOFactory.getDataSetsDAO();
            startCalendar.setTimeInMillis(dataSetsDAO.retrieveSessionStartTime(sessionID));
            finishCalendar.setTimeInMillis(dataSetsDAO.retrieveSessionFinishTime(sessionID));
            fromDateField.setText(dateFormat.format(startCalendar.getTime()));
            fromTimeField.setText(timeFormat.format(startCalendar.getTime()));
            toDateField.setText(dateFormat.format(finishCalendar.getTime()));
            if ( ! toTimeField.isFocusOwner() )
                toTimeField.setText(timeFormat.format(finishCalendar.getTime()));
            dataSetsDAO.closeConnection();
        } catch (DBException e) {
            ErrorHandler.modalError(this, "Cannot retrieve data from database", "Update of session title in database unsuccessful", e);
        }
    }
View Full Code Here

TOP

Related Classes of nz.co.abrahams.asithappens.storage.DataSetsDAO

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.