Beispiel #1
0
        void GenerateEvents(CustomEventList eventList)
        {
            int count = schedulerDataStorage1.Resources.Count;

            for (int i = 0; i < count; i++)
            {
                Resource resource   = schedulerDataStorage1.Resources[i];
                string   subjPrefix = resource.Caption + "'s ";
                eventList.Add(CreateEvent(eventList, subjPrefix + "meeting", resource.Id, 2, 5));
                eventList.Add(CreateEvent(eventList, subjPrefix + "travel", resource.Id, 3, 6));
                eventList.Add(CreateEvent(eventList, subjPrefix + "phone call", resource.Id, 0, 10));
            }
        }
Beispiel #2
0
        CustomEvent CreateEvent(CustomEventList eventList, string subject, object resourceId, int status, int label)
        {
            CustomEvent apt = new CustomEvent(eventList);

            apt.Subject = subject;
            apt.OwnerId = resourceId;
            Random rnd            = RandomInstance;
            int    rangeInMinutes = 60 * 24;

            apt.StartTime = DateTime.Today + TimeSpan.FromMinutes(rnd.Next(0, rangeInMinutes));
            apt.EndTime   = apt.StartTime + TimeSpan.FromMinutes(rnd.Next(0, rangeInMinutes / 4));
            apt.Status    = status;
            apt.Label     = label;
            return(apt);
        }
Beispiel #3
0
        void InitAppointments()
        {
            this.schedulerDataStorage1.Appointments.Mappings.Start          = "StartTime";
            this.schedulerDataStorage1.Appointments.Mappings.End            = "EndTime";
            this.schedulerDataStorage1.Appointments.Mappings.Subject        = "Subject";
            this.schedulerDataStorage1.Appointments.Mappings.AllDay         = "AllDay";
            this.schedulerDataStorage1.Appointments.Mappings.Description    = "Description";
            this.schedulerDataStorage1.Appointments.Mappings.Label          = "Label";
            this.schedulerDataStorage1.Appointments.Mappings.Location       = "Location";
            this.schedulerDataStorage1.Appointments.Mappings.RecurrenceInfo = "RecurrenceInfo";
            this.schedulerDataStorage1.Appointments.Mappings.ReminderInfo   = "ReminderInfo";
            this.schedulerDataStorage1.Appointments.Mappings.ResourceId     = "OwnerId";
            this.schedulerDataStorage1.Appointments.Mappings.Status         = "Status";
            this.schedulerDataStorage1.Appointments.Mappings.Type           = "EventType";

            CustomEventList eventList = new CustomEventList();

            GenerateEvents(eventList);
            this.schedulerDataStorage1.Appointments.DataSource = eventList;
        }
Beispiel #4
0
 public CustomEvent(CustomEventList events)
 {
     this.events = events;
 }