Exemple #1
0
        private void CreateSpecialAppointment(List <CustomAppointment> eventList)
        {
            CustomAppointment apt = new CustomAppointment();

            apt.Subject   = "Finalize";
            apt.OwnerId   = CustomResourceCollection[0].ResID;
            apt.StartTime = DateTime.Today.AddHours(20);
            apt.EndTime   = apt.StartTime.AddHours(1);
            apt.Status    = 2;
            apt.Label     = 1;
            eventList.Add(apt);
        }
Exemple #2
0
        private CustomAppointment CreateEvent(string subject, string additionalInfo, object resourceId, int status, int label)
        {
            CustomAppointment apt = new CustomAppointment();

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

            apt.StartTime = DateTime.Today.AddHours(9) + TimeSpan.FromMinutes(rnd.Next(0, rangeInMinutes));
            apt.EndTime   = apt.StartTime + TimeSpan.FromMinutes(rnd.Next(0, 180));
            apt.Status    = status;
            apt.Label     = label;
            return(apt);
        }