Package clips.delegate.shedule.holidays

Examples of clips.delegate.shedule.holidays.SheduleHolidayData


    }

    @Override
    public Object getValueAt(int row, int col) {
        try {
            SheduleHolidayData holiday = shl.iterator().get(row);
            if (col == COL_DATE) {
                Calendar cal = GregorianCalendar.getInstance();
                cal.set(Calendar.MONTH, holiday.getMonth() - 1);
                return String.format("%02d %s", holiday.getDay(),
                        cal.getDisplayName(Calendar.MONTH, Calendar.SHORT, new Locale("RU")));
               
            } else if (col == COL_DESC) {
                return holiday.getDescription();
            }
        } catch (ClipsException e) {
            return new ErrorValue(e);
        }
        return null;
View Full Code Here


    }

    @Override
    public void setValueAt(Object obj, int row, int col) {
        try {
            SheduleHolidayData day = shl.iterator().get(row);
            if (col == COL_DESC) {
                day.setDescription((String) obj);
            }
        } catch (ClipsException e) {
            MessageBox.showException(e);
        }
    }
View Full Code Here

            try {
                Selector ii = dlg.getDays();
                for(int i=0; i<ii.size(); i++) {
                    SheduleHolidayDetails details = (SheduleHolidayDetails) ii.get(i);
                    if(details != null) {
                        SheduleHolidayData day = new SheduleHolidayData();                       
                        day.setDay(details.day);
                        day.setMonth(details.month);
                        day.setDescription(details.description);
                        shl.iterator().append(day);
                    }
                }
                table.setModel(new TableModelSheduleHoliday(shl.canModify(), shl));
            } catch(ClipsException ex) {
View Full Code Here

            if(col == COL_DATE) {
                return day.toString() + " " + day.getDayOfWeek().getShortTitle();
               
            } else if(col == COL_PLANNED) {
                SheduleHolidayData holiday = shl.getHoliday(day.getDay(), getTableMonth());
                if(holiday != null) {
                    return "Праздничный день: " + holiday.getDescription();
                }
                DayOfWeek dow = day.getDayOfWeek();
                TimeOffset timeBegin = swl.getTimeBegin(dow);
                TimeOffset timeEnd = swl.getTimeEnd(dow);
                if(timeBegin.getRaw() == 0) {
View Full Code Here

        }

        //6. Если исключений нет, получаем праздники за указанную неделю
        //если в этот день праздник, отмечаем день как закрытый
        if (exception == null) {
            SheduleHolidayData holiday = shl.getHoliday(day.getDay(), day.getMonth() + 1);
            if (holiday != null) {
                res.setWorking(false);
                res.setDescription(holiday.getDescription());
                return res;
            }
        }

        //7. Врач работает по шаблону. получаем шаблон расписания для данного врача
View Full Code Here

TOP

Related Classes of clips.delegate.shedule.holidays.SheduleHolidayData

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.