Ejemplo n.º 1
0
        private void InitializeLabels()
        {
            try
            {
                this.labelsTableAdapter.Fill(this.lorikeetAppDataSet.Labels);

                DataTable labels = this.lorikeetAppDataSet.Labels;

                if (labels.Rows.Count == 0)
                {
                    return;
                }

                schedulerControl1.Storage.Appointments.Labels.Clear();

                schedulerControl1.Storage.Appointments.Labels.BeginUpdate();
                for (int i = 0; i < labels.Rows.Count; i++)
                {
                    Color            color       = Color.FromArgb(Int32.Parse(labels.Rows[i].ItemArray[1].ToString()));
                    string           displayName = labels.Rows[i].ItemArray[2].ToString();
                    string           menuCaption = labels.Rows[i].ItemArray[3].ToString();
                    AppointmentLabel aptLabel    = schedulerControl1.Storage.Appointments.Labels.CreateNewLabel(labels.Rows[i].ItemArray[0], displayName, menuCaption, color);
                    schedulerControl1.Storage.Appointments.Labels.Add(aptLabel);
                }

                schedulerControl1.Storage.Appointments.Labels.EndUpdate();
            }
            catch (Exception ex)
            {
                MessageBox.Show(MiscStuff.GetAllMessages(ex));
            }
        }
 void scheduler_AppointmentViewInfoCustomizing(object sender, DevExpress.Xpf.Scheduler.AppointmentViewInfoCustomizingEventArgs e)
 {
     if (e.ViewInfo.Location == String.Empty)
     {
         AppointmentLabel label = this.scheduler.Storage.AppointmentStorage.Labels.CreateNewLabel("");
         label.SetColor(Colors.White);
         e.ViewInfo.Label = label;
     }
     if (e.ViewInfo.Location.Contains("Orange"))
     {
         AppointmentLabel label = this.scheduler.Storage.AppointmentStorage.Labels.CreateNewLabel("");
         label.SetColor(Colors.Orange);
         e.ViewInfo.Label = label;
     }
     if (e.ViewInfo.Location.Contains("Green"))
     {
         AppointmentLabel label = this.scheduler.Storage.AppointmentStorage.Labels.CreateNewLabel("");
         label.SetColor(Colors.Green);
         e.ViewInfo.Label = label;
     }
     if (e.ViewInfo.Location.Contains("Blue"))
     {
         AppointmentLabel label = this.scheduler.Storage.AppointmentStorage.Labels.CreateNewLabel("");
         label.SetColor(Colors.Blue);
         e.ViewInfo.Label = label;
     }
 }
Ejemplo n.º 3
0
        protected internal ScheduleVM(Action <bool> RegistrateEnabled)
        {
            this.RegistrateEnabled = RegistrateEnabled;
            ScheduleM                   = new ScheduleM();
            Loading                     = new BackgroundWorker();
            Loading.DoWork             += LoadingModel;
            Loading.RunWorkerCompleted += LoadingModelComplete;
            Loading.RunWorkerAsync();

            AppointmentLabel label = ScheduleM.Labels.CreateNewLabel(1, "Előjegyezve", "Előjegyezve", (Color)ColorConverter.ConvertFromString("#FFF8D040"));

            ScheduleM.Labels.Add(label);
            label = ScheduleM.Labels.CreateNewLabel(2, "Megjelent", "Megjelent", (Color)ColorConverter.ConvertFromString("#FF97F26D"));
            ScheduleM.Labels.Add(label);
            label = ScheduleM.Labels.CreateNewLabel(3, "Nem jelent meg", "Nem jelent meg", (Color)ColorConverter.ConvertFromString("#FFFF6961"));
            ScheduleM.Labels.Add(label);
            label = ScheduleM.Labels.CreateNewLabel(4, "Lemondta", "Lemondta", (Color)ColorConverter.ConvertFromString("#FFFFCCEB"));
            ScheduleM.Labels.Add(label);
            label = ScheduleM.Labels.CreateNewLabel(5, "Új időpontot kért", "Új időpontot kért", (Color)ColorConverter.ConvertFromString("#FF9FD3F5"));
            ScheduleM.Labels.Add(label);

            Erase.DoWork              += EraseDoWork;
            Erase.RunWorkerCompleted  += EraseComplete;
            Create.DoWork             += CreateDoWork;
            Create.RunWorkerCompleted += CreateComplete;
            Modify.DoWork             += ModifyDoWork;
            Modify.RunWorkerCompleted += ModifyComplete;
        }
Ejemplo n.º 4
0
        private AppointmentLabel CloneLabel(AppointmentLabel source)
        {
            AppointmentLabel clone = new AppointmentLabel();

            clone.Color       = source.Color;
            clone.DisplayName = source.DisplayName;
            clone.MenuCaption = source.MenuCaption;
            return(clone);
        }
 void ChangeDefulatLabelsCaptions(SchedulerStorage someStorage)
 {
     for (int i = 0; i < someStorage.Appointments.Labels.Count; i++)
     {
         AppointmentLabel currentLabel = someStorage.Appointments.Labels[i];
         int ii = i + 1;
         currentLabel.DisplayName = "Couleur" + ii;
         currentLabel.MenuCaption = currentLabel.DisplayName;
     }
 }
Ejemplo n.º 6
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            PrepareFilteredStorage(Control.Storage);
            AppointmentLabel lbl = actualStorage.Appointments.Labels[Controller.LabelId];
            int index            = GetFilteredLabelIndex(lbl);

            edtLabel.Storage = filteredStorage;
            edtLabel.Label   = filteredStorage.Appointments.Labels[index];
        }
Ejemplo n.º 7
0
        private void DeleteLabelFromDataBase(AppointmentLabel selectedLabel)
        {
            string filterExpression = string.Format("Color = '{0}'", selectedLabel.Color.ToArgb());

            DataRow[] labelRow = carsDBLabelDataSet11.Tables["Labels"].Select(filterExpression);
            labelRow[0]["Color"]       = this.deletedLabel.Color.ToArgb();
            labelRow[0]["DisplayName"] = this.deletedLabel.DisplayName;
            labelRow[0]["MenuCaption"] = this.deletedLabel.MenuCaption;
            labelsTableAdapter1.Update(this.carsDBLabelDataSet11);
            carsDBLabelDataSet11.AcceptChanges();
        }
Ejemplo n.º 8
0
        public Form1()
        {
            InitializeComponent();
            SetMappings();

            AppointmentLabel label = schedulerStorage1.Appointments.Labels.CreateNewLabel("Violet");

            label.SetColor(System.Drawing.Color.Violet);
            schedulerStorage1.Appointments.Labels.Add(label);

            schedulerStorage1.DateTimeSavingMode = DateTimeSavingMode.Utc;
        }
        public ucCalendarTypes()
        {
            InitializeComponent();
            colWorking      = Color.LightGreen;
            colNonWorking   = Color.LightPink;
            lbWorkingDay    = new AppointmentLabel(colWorking, "Working Day", "WorkingDay");
            lbNonWorkingDay = new AppointmentLabel(colNonWorking, "Non Working Day", "&NonWorkingDay");

            ssWorkingDays.Appointments.Labels.Clear();
            ssWorkingDays.Appointments.Labels.Add(lbWorkingDay);
            ssWorkingDays.Appointments.Labels.Add(lbNonWorkingDay);
        }
Ejemplo n.º 10
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (appointmentLabelEdit1.SelectedIndex == -1)
            {
                MessageBox.Show("Please select a valid label");
                return;
            }
            int index = appointmentLabelEdit1.SelectedIndex;
            AppointmentLabel selectedLabel = schedulerStorage1.Appointments.Labels[index];

            DeleteLabelFromLabelCollection(index);
            DeleteLabelFromDataBase(selectedLabel);

            schedulerControl1.RefreshData();
        }
Ejemplo n.º 11
0
        private void OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            var vm = DataContext as WorkingManageViewModel;

            if (vm == null)
            {
                return;
            }

            scheduler.Storage.AppointmentStorage.Labels.Clear();
            foreach (var label in vm.Labels)
            {
                var appointmentLabel = new AppointmentLabel(label.Color, label.Name, label.Name);
                scheduler.Storage.AppointmentStorage.Labels.Add(appointmentLabel);
            }
        }
        private object CreateNewLabel(int intColor)
        {
            Color  color     = Color.FromArgb(intColor);
            string labelName = "x" + intColor.ToString("X");

            foreach (KnownColor kColor in Enum.GetValues(typeof(KnownColor)))
            {
                Color known = Color.FromKnownColor(kColor);
                if (intColor == known.ToArgb())
                {
                    labelName = known.Name;
                }
            }
            AppointmentLabel label = storage.Appointments.Labels.CreateNewLabel(labelName);

            label.SetColor(color);
            storage.Appointments.Labels.Add(label);
            return(label.Id);
        }
Ejemplo n.º 13
0
        public ucmodule2()
        {
            InitializeComponent();
            schedulerStorage1.Appointments.Labels.Clear();

            AppointmentLabel a = new AppointmentLabel(Color.LightPink, "Code", "Code");
            AppointmentLabel b = new AppointmentLabel(Color.Yellow, "Créneau", "Créneau");
            AppointmentLabel d = new AppointmentLabel(Color.FromArgb(92, 229, 232), " Conduite", "Conduite");

            schedulerStorage1.Appointments.Labels.Add(a);
            schedulerStorage1.Appointments.Labels.Add(b);
            schedulerStorage1.Appointments.Labels.Add(d);

            schedulerStorage1.TimeZoneId = TimeZoneInfo.Local.Id;
            schedulerControl1.OptionsBehavior.ClientTimeZoneId = TimeZoneInfo.Local.Id;
            foreach (SkinContainer cnt in SkinManager.Default.Skins)
            {
                comboBoxEdit1.Properties.Items.Add(cnt.SkinName);
            }
        }
Ejemplo n.º 14
0
 static void ChangingLabelColorSchemeAction(SchedulerControl scheduler)
 {
     #region #ChangingLabelColorScheme
     IAppointmentLabelStorage labelStorage = scheduler.Storage.Appointments.Labels;
     foreach (IAppointmentLabel label in labelStorage)
     {
         AppointmentLabel appLabel = label as AppointmentLabel;
         if (appLabel != null)
         {
             string skinElemName = AppointmentLabel.GetSkinElementName(appLabel.ColorId);
             Color  skinColor    = DevExpress.Skins.SkinManager.Default.Skins["Office 2016 Colorful"].GetSkin(DevExpress.Skins.SkinProductId.Scheduler).Colors.GetPrimaryColor(skinElemName, Color.Empty);
             if (skinColor == Color.Empty)
             {
                 skinColor = AppointmentLabel.GetDefaultColorByStringId(appLabel.ColorId);
             }
             appLabel.SetColor(skinColor);
         }
         scheduler.ActiveView.LayoutChanged();
     }
     #endregion #ChangingLabelColorScheme
 }
Ejemplo n.º 15
0
        private void Form_squedul_Load(object sender, EventArgs e)
        {
            schedulerControl1.Start = DateTime.Now;
            // TODO: esta línea de código carga datos en la tabla 'dS_DataEmprende.tipo_evento' Puede moverla o quitarla según sea necesario.
            this.tipo_eventoTableAdapter.Fill(this.dS_DataEmprende.tipo_evento);
            schedulerStorage1.Appointments.Labels.Clear();

            int    color;
            string tipo_evento;

            MyColour c = new MyColour();

            tipo_eventoBindingSource.MoveFirst();
            for (int i = 0; i < tipo_eventoBindingSource.Count; i++)
            {
                DataRowView view = (DataRowView)tipo_eventoBindingSource.Current;
                color       = Convert.ToInt32(view["color"].ToString());
                tipo_evento = view["tipo_evento"].ToString();

                c.Colour = Color.FromKnownColor((KnownColor)color);
                AppointmentLabel lbl = new AppointmentLabel(Color.FromName(c.Colour.Name), tipo_evento, tipo_evento);
                schedulerStorage1.Appointments.Labels.Add(lbl);


                tipo_eventoBindingSource.MoveNext();
            }



            if (mia.nivel_acceso == 1)
            {
                this.appointmentsTableAdapter.Fill(this.dS_DataEmprende.Appointments);
            }
            if (mia.nivel_acceso == 3)
            {
                this.appointmentsTableAdapter.filtra_tipo_cita(this.dS_DataEmprende.Appointments, mia.id_profesor);
            }

            actualiza_apps_grupos();
        }
        void InitializeLabelsAndStutuses()
        {
            Labels = new AppointmentLabelCollection();
            int count = IssueList.Length;

            for (int i = 0; i < count; i++)
            {
                AppointmentLabel label = Labels.CreateNewLabel(i, IssueList[i]);
                label.SetColor(IssueColorList[i]);
                Labels.Add(label);
            }

            Statuses = new AppointmentStatusCollection();
            count    = PaymentStatuses.Length;
            for (int i = 0; i < count; i++)
            {
                IAppointmentStatus status = Statuses.CreateNewStatus(PaymentStatuses[i], string.Empty);
                status.Type = AppointmentStatusType.Custom;
                status.SetBrush(new SolidColorBrush(PaymentColorStatuses[i]));
                Statuses.Add(status);
            }
        }
Ejemplo n.º 17
0
        private void InitializeLabels()
        {
            this.labelsTableAdapter1.Fill(this.carsDBLabelDataSet11.Labels);

            DataTable labels = this.carsDBLabelDataSet11.Labels;

            if (labels.Rows.Count == 0)
            {
                return;
            }
            schedulerControl1.Storage.Appointments.Labels.Clear();

            schedulerControl1.Storage.Appointments.Labels.BeginUpdate();
            for (int i = 0; i < labels.Rows.Count; i++)
            {
                Color            color       = Color.FromArgb(Int32.Parse(labels.Rows[i].ItemArray[1].ToString()));
                string           dislayName  = labels.Rows[i].ItemArray[2].ToString();
                string           menuCaption = labels.Rows[i].ItemArray[3].ToString();
                AppointmentLabel aptLabel    = new AppointmentLabel(color, dislayName, menuCaption);
                schedulerControl1.Storage.Appointments.Labels.Add(aptLabel);
            }
            schedulerControl1.Storage.Appointments.Labels.EndUpdate();
        }
Ejemplo n.º 18
0
        public void AppointmentClicked(AppointmentLabel sender, EventArgs e)
        {
            AppointmentLabel ap = sender;
            _appointment = ap.Appointment;

            if (ap.Appointment != null)
            {
                _patient = ap.Appointment.Patient;

                // Fill in form details
                patientNameTxt.Text = _patient.ToString();
                dateOfBirthTxt.Text = _patient.DateOfBirth.ToShortDateString();
                startTxt.Text = _appointment.StartDate.ToShortTimeString();
                endTxt.Text = _appointment.EndDate.ToShortTimeString();
                appNotesTxt.Text = _appointment.AppointmentNotes;
                appNotesTxt.ReadOnly = true;

                // Change form fields
                addTestBtn.Enabled = true;

                if (_appointment.StartDate >= DateTime.Now)
                {
                    addPrescriptionBtn.Enabled = true;
                    appNotesTxt.ReadOnly = false;
                    saveAppointmentBtn.Enabled = true;
                }

                FormRefresh();
            }
            else
            {
                patientNameTxt.Text = "";
                startTxt.Text = "";
                endTxt.Text = "";
            }
        }
Ejemplo n.º 19
0
 private int GetFilteredLabelIndex(AppointmentLabel lbl)
 {
     return(filteredStorage.Appointments.Labels.IndexOf(lbl));
 }
Ejemplo n.º 20
0
        protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();

            ListView   listView   = View as ListView;
            DetailView detailView = View as DetailView;

            if (listView != null)
            {
                IObjectSpace os = Application.CreateObjectSpace();
                listView.CollectionSource.CriteriaApplied += (o, e) =>
                {
                    // Предварительная загрузка расписаний докторов
                    var collectionSB = (CollectionSourceBase)o;
                    if (collectionSB.Criteria != null)
                    {
                        var events = new List <DoctorEvent>(os.GetObjects <DoctorEvent>(collectionSB.Criteria[FILTERKEY]));
                        eventsDict = events.ToDictionary(de => de.Oid, de => de);
                    }
                };

                SchedulerListEditor listEditor = ((ListView)View).Editor as SchedulerListEditor;
                if (listEditor != null)
                {
                    SchedulerControl scheduler = listEditor.SchedulerControl;
                    if (scheduler != null)
                    {
                        // Кастомизация надписи в расписании доктора
                        scheduler.InitAppointmentDisplayText += (o, e) =>
                        {
                            Guid guid = (Guid)e.Appointment.Id;
                            if (eventsDict.ContainsKey(guid))
                            {
                                var doctorEvent = eventsDict[guid];
                                e.Text = doctorEvent != null && doctorEvent.Pacient != null ? doctorEvent.Pacient.FullName : string.Empty;
                            }
                        };

                        #region Кастомизация Тултипа расписания доктора

                        // https://documentation.devexpress.com/WindowsForms/118551/Controls-and-Libraries/Scheduler/Visual-Elements/Scheduler-Control/Appointment-Flyout
                        scheduler.OptionsView.ToolTipVisibility = ToolTipVisibility.Always;
                        scheduler.OptionsCustomization.AllowDisplayAppointmentFlyout = false;
                        scheduler.ToolTipController             = new ToolTipController();
                        scheduler.ToolTipController.ToolTipType = ToolTipType.SuperTip;
                        scheduler.ToolTipController.BeforeShow += (o, e) =>
                        {
                            var toolTipController           = (ToolTipController)o;
                            AppointmentViewInfo aptViewInfo = null;
                            try
                            {
                                aptViewInfo = (AppointmentViewInfo)toolTipController.ActiveObject;
                            }
                            catch
                            {
                                return;
                            }

                            if (aptViewInfo == null)
                            {
                                return;
                            }

                            Guid guid = (Guid)aptViewInfo.Appointment.Id;
                            if (!eventsDict.ContainsKey(guid))
                            {
                                // В словаре нет ключа т.к. расписание было только что создано
                                var events = new List <DoctorEvent>(ObjectSpace.GetObjects <DoctorEvent>(listView.CollectionSource.Criteria[FILTERKEY]));
                                eventsDict = events.ToDictionary(de => de.Oid, de => de);
                            }
                            DoctorEvent doctorEvent = eventsDict[guid];
                            // Вид талона (метка)
                            AppointmentLabel label = scheduler.Storage.Appointments.Labels.GetById(doctorEvent.Label);
                            StringBuilder    sb    = new StringBuilder();
                            sb.AppendLine(string.Format("Время: с {0:HH:mm} по {1:HH:mm}", doctorEvent.StartOn, doctorEvent.EndOn));
                            sb.AppendLine(string.Format("Пациент: {0}", doctorEvent.Pacient != null ? doctorEvent.Pacient.FullName : null));
                            sb.AppendLine(string.Format("Кем создано: {0}", doctorEvent.CreatedBy != null ? doctorEvent.CreatedBy.FullName : null));
                            sb.AppendLine(string.Format("Кто записал: {0}", doctorEvent.EditedBy != null ? doctorEvent.EditedBy.FullName : null));
                            sb.AppendLine(string.Format("Вид талона: {0}", label.DisplayName));
                            if (doctorEvent.Pacient != null)
                            {
                                sb.AppendLine(string.Format("Источник записи: {0}", CaptionHelper.GetDisplayText(doctorEvent.SourceType)));
                            }

                            SuperToolTip          SuperTip = new SuperToolTip();
                            SuperToolTipSetupArgs args     = new SuperToolTipSetupArgs();
                            args.Contents.Text = sb.ToString();
                            args.Contents.Font = new Font("Times New Roman", 11);
                            SuperTip.Setup(args);
                            e.SuperTip = SuperTip;
                        };

                        #endregion

                        // Кастомизация коллекции меток
                        var storage = scheduler.Storage;
                        IAppointmentLabelStorage labelStorage = storage.Appointments.Labels;
                        FillLabelStorage(labelStorage);

                        #region Кастомизация всплывающего меню на расписании врача
                        DoctorEvent recordedEvent = null;
                        VisitCase   visitCase     = null;

                        // Всплывающее меню на расписании врача
                        scheduler.PopupMenuShowing += (o, e) =>
                        {
                            Pacient pacient = listView.Tag as Pacient;
                            AppointmentBaseCollection appoinments = (o as SchedulerControl).SelectedAppointments;
                            Appointment appoinment = appoinments.Count == 1 ? appoinments[0] : null;
                            if (appoinment == null)
                            {
                                return;
                            }

                            Guid        key    = (Guid)appoinment.Id;
                            DoctorEvent dEvent = appoinment != null && eventsDict.ContainsKey(key) ? eventsDict[key] : null;

                            if (e.Menu.Id != DevExpress.XtraScheduler.SchedulerMenuItemId.AppointmentMenu)
                            {
                                return;
                            }
                            if (pacient != null && dEvent.Pacient == null & recordedEvent == null && dEvent.StartOn > DateTime.Now)
                            {
                                e.Menu.Items.Insert(0, new SchedulerMenuItem("Записать пациента", (o_, e_) =>
                                {
                                    IObjectSpace dEventObjectSpace = XPObjectSpace.FindObjectSpaceByObject(dEvent);
                                    dEvent.Pacient = dEventObjectSpace.GetObject(pacient);
                                    dEventObjectSpace.CommitChanges();
                                    // Обновление списочного представления
                                    listView.CollectionSource.Reload();
                                    // Расписание на которое записан пациент
                                    recordedEvent = dEvent;
                                    // Создание посещения для пациента
                                    visitCase = VisitCase.CreateVisitCase(dEventObjectSpace,
                                                                          dEventObjectSpace.GetObject(pacient),
                                                                          dEvent.AssignedTo, dEvent.StartOn);
                                    dEventObjectSpace.CommitChanges();
                                }));
                            }
                            else if (dEvent != null && dEvent.Pacient != null)
                            {
                                e.Menu.Items.Insert(0, new SchedulerMenuItem("Отменить запись", (o_, e_) =>
                                {
                                    IObjectSpace dEventObjectSpace = XPObjectSpace.FindObjectSpaceByObject(dEvent);
                                    dEvent.Pacient = null;
                                    dEventObjectSpace.CommitChanges();
                                    // Обновление списочного представления
                                    listView.CollectionSource.Reload();
                                    // Отмена записи пациента на выбранное расписание
                                    if (recordedEvent != null && recordedEvent.Oid == dEvent.Oid)
                                    {
                                        recordedEvent = null;
                                    }
                                    if (visitCase != null)
                                    {
                                        dEventObjectSpace.Delete(visitCase);
                                        dEventObjectSpace.CommitChanges();
                                    }
                                }));
                            }
                        };

                        #endregion

                        // Кастомизация цвета фона расписания:
                        // Если выбранный пациент уже записан, то цвет расписания окрашивается в светло-розовый.
                        // Если в расписании записан другой пациент, то цвет расписания окрашивается в морковный.
                        scheduler.AppointmentViewInfoCustomizing += (o_, e_) =>
                        {
                            Pacient pacient = listView.Tag as Pacient;
                            if (pacient != null)
                            {
                                Guid guid = (Guid)e_.ViewInfo.Appointment.Id;
                                if (eventsDict.ContainsKey(guid) && eventsDict[guid].Pacient != null)
                                {
                                    e_.ViewInfo.Appearance.BackColor = eventsDict[guid].Pacient.Oid == pacient.Oid ?
                                                                       Color.FromArgb(255, 192, 192) : Color.FromArgb(255, 128, 0);
                                }
                            }
                        };
                    }
                }
            }
            else if (detailView != null)
            {
                // Кастомизация коллекции меток
                foreach (SchedulerLabelPropertyEditor pe in ((DetailView)View).GetItems <SchedulerLabelPropertyEditor>())
                {
                    if (pe.Control != null)
                    {
                        ISchedulerStorage        storage      = ((AppointmentLabelEdit)pe.Control).Storage;
                        IAppointmentLabelStorage labelStorage = storage.Appointments.Labels;
                        FillLabelStorage(labelStorage);
                    }
                }
            }
        }
Ejemplo n.º 21
0
        private void Form_squedul_Load(object sender, EventArgs e)
        {
            schedulerControl1.Start = DateTime.Now;
            // TODO: esta línea de código carga datos en la tabla 'dS_DataEmprende.tipo_evento' Puede moverla o quitarla según sea necesario.
            this.tipo_eventoTableAdapter.Fill(this.dS_DataEmprende.tipo_evento);
            schedulerStorage1.Appointments.Labels.Clear();

            int color;
            string tipo_evento;

            MyColour c = new MyColour();

            tipo_eventoBindingSource .MoveFirst();
            for (int i = 0; i < tipo_eventoBindingSource.Count; i++)
            {
                DataRowView view = (DataRowView)tipo_eventoBindingSource.Current;
                color = Convert.ToInt32(view["color"].ToString());
                tipo_evento = view["tipo_evento"].ToString();

                c.Colour = Color.FromKnownColor((KnownColor)color);
                AppointmentLabel lbl = new AppointmentLabel(Color.FromName(c.Colour.Name), tipo_evento,tipo_evento);
                schedulerStorage1.Appointments.Labels.Add(lbl);

                tipo_eventoBindingSource.MoveNext();

            }

            if (mia.nivel_acceso == 1)
               this.appointmentsTableAdapter.Fill(this.dS_DataEmprende.Appointments);
            if (mia.nivel_acceso == 3)
                this.appointmentsTableAdapter.filtra_tipo_cita(this.dS_DataEmprende.Appointments, mia.id_profesor);

            actualiza_apps_grupos();
        }
Ejemplo n.º 22
0
        public void BindLabesList()
        {
            DurumList durumlar = new DurumList();
            schRezervasyon.Storage.AppointmentStorage.Labels.Clear();
            foreach (var item in durumlar.GetDurumList())
            {
                AppointmentLabel label = new AppointmentLabel(item.Renk, item.DurumAdi, item.DurumAdi);
                schRezervasyon.Storage.AppointmentStorage.Labels.Add(label);

            }
        }
Ejemplo n.º 23
0
 private int GetActualLabelIndex(AppointmentLabel lbl)
 {
     return(actualStorage.Appointments.Labels.IndexOf(lbl));
 }