Package clips.delegate.shedule.reception

Examples of clips.delegate.shedule.reception.SheduleReceptionData


        }
       
        @Override
        public Object getValueAt(int rowIndex, int col) {
            try {
                SheduleReceptionData data = datas.get(rowIndex);
           
                if (col == COL_TIME) {
                    Calendar tb = GregorianCalendar.getInstance();
                    Calendar te = GregorianCalendar.getInstance();
                    tb.setTime(data.getBegin());
                    te.setTime(data.getEnd());
                    return  String.format("%02d:%02d-%02d:%02d", tb.get(Calendar.HOUR_OF_DAY),
                            tb.get(Calendar.MINUTE), te.get(Calendar.HOUR_OF_DAY), te.get(Calendar.MINUTE));
                }
                else if (col == COL_CLIENT) {
                    return data.getClient(null).toString();
                }
                else if (col == COL_DUTY){
                    String services = "";
                    List<Integer> srl = data.getLinkedServicesList();
                    List<SerRenLocal> clientServices = data.getClient(null).getSerRenListToRender();

                    for (int i = 0; i < clientServices.size(); i++) {
                        SerRenLocal s = clientServices.get(i);
                        if (srl.contains(s.getID())) {
                            try {
View Full Code Here


       
        class SheduleReceptionDataComparator implements Comparator {

            @Override
            public int compare(Object o1, Object o2) {
                SheduleReceptionData p1 = (SheduleReceptionData) o1;
                SheduleReceptionData p2 = (SheduleReceptionData) o2;
                if (p1.getBegin().after(p2.getBegin())) {
                    return 1;
                } else {
                    return -1;
                }
            }
View Full Code Here

   
    class ShowPrevouseReceptionProcess implements ListSelectionListener {

        @Override
        public void valueChanged(ListSelectionEvent e) {
             SheduleReceptionData item = (SheduleReceptionData) prevoiseReceptions.getSelectedValue();
             if(item == null) {
                 return;
             }
             try {
                 /*if(!item.getCollaborator().isVisible()) {
                     //сотруднег уволен нах
                     MessageBox.showError(MessageBox.E_MAKE_FUCKING_EXCEPTION);
                     return;
                 }*/
                
                if(isDirty()) {
                    return;
                }
                
                DirectoryCollaboratorItem selectedCollaborator = item.getCollaborator();
                fillCollaboratorCombo(selectedCollaborator);
               
                calendar.removePropertyChangeListener(calendarProcess);
                Calendar cal = GregorianCalendar.getInstance();
                cal.setTime(item.getBegin());
                calendar.setCalendar(cal);
                calendar.addPropertyChangeListener(calendarProcess);
               
                initPanel(selectedCollaborator);
                setPanelMode(PANELMODE_OK, null);
View Full Code Here

        }
       
        @Override
        public Object getValueAt(int rowIndex, int col) {
            try {
                SheduleReceptionData data = datas.get(rowIndex);
           
                if (col == COL_TIME) {
                    Calendar tb = GregorianCalendar.getInstance();
                    Calendar te = GregorianCalendar.getInstance();
                    tb.setTime(data.getBegin());
                    te.setTime(data.getEnd());
                    return  String.format("%02d:%02d-%02d:%02d", tb.get(Calendar.HOUR_OF_DAY),
                            tb.get(Calendar.MINUTE), te.get(Calendar.HOUR_OF_DAY), te.get(Calendar.MINUTE));
                }
                else if (col == COL_CLIENT) {
                    return data.getClient(null).toString();
                }
                else if (col == COL_DUTY){
                    String services = "";
                    List<Integer> srl = data.getLinkedServicesList();
                    List<SerRenLocal> clientServices = data.getClient(null).getSerRenListToRender();

                    for (int i = 0; i < clientServices.size(); i++) {
                        SerRenLocal s = clientServices.get(i);
                        if (srl.contains(s.getID())) {
                            services += " - " + s.getService().getTitle() + "\n";
View Full Code Here

       
        class SheduleReceptionDataComparator implements Comparator {

            @Override
            public int compare(Object o1, Object o2) {
                SheduleReceptionData p1 = (SheduleReceptionData) o1;
                SheduleReceptionData p2 = (SheduleReceptionData) o2;
                if (p1.getBegin().after(p2.getBegin())) {
                    return 1;
                } else {
                    return -1;
                }
            }
View Full Code Here

                dlg.mDuration.setValue(10);

                dlg.setVisible(true);
                if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
                    Calendar gc = day.getCalendar();
                    SheduleReceptionData item = new SheduleReceptionData(client, collaborator);
                   
                    update(item, dlg, gc);
                    recs.append(item);
                    addTimeSpan(new TimeSpanItem(item));
                    fireTimeModelEvent();
View Full Code Here

    public Component getListCellRendererComponent(JList list,
            Object value,
            int index,
            boolean isSelected,
            boolean cellHasFocus) {
        SheduleReceptionData item = (SheduleReceptionData) value;
        String str = "Ошибка";
        ImageIcon icon = null;
        try {
            DirectoryCollaboratorItem coll = item.getCollaborator();
            str = String.format("<html><p><u>Врач:</u><br>%s</p><p><u>Дата:</u><br>%s</p></html>",
                    coll.toString(), Converter.dateToString(item.getBegin()));
            icon = coll.getImage();
            if(icon == null) {
                icon = defaultImage;
            }
        } catch (ClipsException ex) {
View Full Code Here

        this.recs = recs;
        this.collaborator = collaborator;
        this.descriptor = descriptor;

        for(int i=0; i<recs.size(); i++) {
            SheduleReceptionData item = recs.get(i);
            TimeSpanItem span = new TimeSpanItem(item);
            addTimeSpan(span);
        }
        if(client != null) {
            serviceRenders.put(client.getID(), client.getSerRenListToRender());
View Full Code Here

     * @param span
     */
    private void removeSpanWithConformation(TimeSpanItem span) {
        if (MessageBox.showConfirmYesNo(MessageBox.C_DEL_RECORD_ON_RECEPTION) == MessageBox.ANSWER_YES) {
            TimeSpanItem itemSpan = span;
            SheduleReceptionData work = itemSpan.get();
            recs.remove(work);
            removeTimeSpan(span);

            //обновляем информацию в кеше о том, что некоторые услуги перестали быть записанными на прием
            try {
                ClientLocal client = work.getClient(am);
                List<SerRenLocal> clientServices = getServices(client);
                //update available function
                List<Integer> orphanServices = work.getLinkedServicesList();
                for (int i = 0; i < clientServices.size(); i++) {
                    SerRenLocal s = clientServices.get(i);
                    s.addContentStateListener(emptyListener);
                    if (orphanServices.contains(s.getID())) {
                        s.setReception(null);
View Full Code Here

     * @param table
     */
    @Override
    public void spanResized(TimeSpan span, JTimeTable table) {
        TimeSpanItem itemSpan = (TimeSpanItem) span;
        SheduleReceptionData item = itemSpan.get();
        item.setBegin(span.getBegin());
        item.setDuration(span.getLength());
    }
View Full Code Here

TOP

Related Classes of clips.delegate.shedule.reception.SheduleReceptionData

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.