Example #1
0
        public static ExigoService.Calendar CreateCalendar(CreateCalendarRequest request)
        {
            // Create the calendar
            var calendar = new CalendarContext.Calendar();
            calendar.CalendarID = Guid.NewGuid();
            calendar.CustomerID = request.CustomerID;
            calendar.Description = request.Description;
            calendar.CalendarTypeID = 1;
            calendar.CreatedDate = DateTime.Now;

            // Save the calendar
            var context = Exigo.ODataCalendars();
            context.AddToCalendars(calendar);
            context.SaveChanges();

            // Return the new calendar
            return (ExigoService.Calendar)calendar;
        }
Example #2
0
        public static ExigoService.Calendar CreateCalendar(CreateCalendarRequest request)
        {
            // Create the calendar
            var calendar = new CalendarContext.Calendar();

            calendar.CalendarID     = Guid.NewGuid();
            calendar.CustomerID     = request.CustomerID;
            calendar.Description    = request.Description;
            calendar.CalendarTypeID = 1;
            calendar.CreatedDate    = DateTime.Now;

            // Save the calendar
            var context = Exigo.ODataCalendars();

            context.AddToCalendars(calendar);
            //TODO: Calendar: Commented out because of error -- context.SaveChanges();

            // Return the new calendar
            return((ExigoService.Calendar)calendar);
        }