Ejemplo n.º 1
0
        private void FetchAppointmentsExecute(DevExpress.XtraScheduler.FetchAppointmentsEventArgs e)
        {
            TimeInterval currentInterval = e.Interval as TimeInterval;

            if (lastFetchedInterval.Contains(currentInterval))
            {
                return;
            }
            lastFetchedInterval = currentInterval;
            //
            var entities = from entity in context.IHP_HARMONOGRAM_DZIENNY
                           where (entity.CZASSTART <lastFetchedInterval.End && entity.CZASSTOP> lastFetchedInterval.Start)
                           select entity;

            entities.Load();
            var Appo = context.IHP_HARMONOGRAM_DZIENNY.Local.ToList();

            Appointments.Clear();
            foreach (IHP_HARMONOGRAM_DZIENNY item in Appo)
            {
                //   item.TEMAT = item.ARIT_HARMONOGRAM.HODOWCA ;
                //  item.LABELID = 2;
                //  item.WagaSr = 22;
                Appointments.Add(item);
            }
        }
 protected void ASPxScheduler1_FetchAppointments(object sender, DevExpress.XtraScheduler.FetchAppointmentsEventArgs e)
 {
     if (this.fetchInterval.Contains(e.Interval) || e.Interval.Start == DateTime.MinValue)
     {
         return;
     }
     SetAppointmentDataSourceSelectCommandParameters(e.Interval);
     e.ForceReloadAppointments = true;
     this.fetchInterval        = e.Interval;
 }
Ejemplo n.º 3
0
        private void FetchAppointmentsExecute(DevExpress.XtraScheduler.FetchAppointmentsEventArgs e)
        {
            TimeInterval currentInterval = e.Interval as TimeInterval;

            if (lastFetchedInterval.Contains(currentInterval))
            {
                return;
            }

            lastFetchedInterval = currentInterval;
            var entities = from entity in carsXtraSchedulingEntities.CarSchedulings
                           where entity.EventType > 0 || (entity.StartTime <lastFetchedInterval.End && entity.EndTime> lastFetchedInterval.Start)
                           select entity;

            entities.Load();
            Appointments = carsXtraSchedulingEntities.CarSchedulings.Local.ToBindingList();
        }
 protected void ASPxScheduler1_FetchAppointments(object sender, DevExpress.XtraScheduler.FetchAppointmentsEventArgs e)
 {
     SetAppointmentDataSourceSelectCommandParameters(e.Interval);
     e.ForceReloadAppointments = true;
 }