PublicAPI.Portal.CalendarEvent.Create ELMA API Documentation
Creates an user group event for the general calendar
 
 
Syntax

public CalendarEvent Create(
	IEnumerable<User> users,
	IEnumerable<Schedule> calendars,
	DateTime startDate,
	DateTime endDate,
	string eventSubject,
	string eventPlace,
	string eventDescription
)

Parameters

users
Type: System.Collections.Generic IEnumerable User 
Users List. Object. Access path: PublicAPI.Portal.Security.User
calendars
Type: System.Collections.Generic IEnumerable Schedule 
Calendars List. Object. Access path: PublicAPI.Portal.Objects.Calendar.Schedule
startDate
Type: System DateTime
Event Start Date
endDate
Type: System DateTime
Event End Date
eventSubject
Type: System String
Event Subject
eventPlace
Type: System String
Event Place
eventDescription
Type: System String
Event Description (optional parameter)

Return Value

Type: CalendarEvent
Calendar Event
Examples

//create an empty users list 
var userList = new List<IUser>();
//load users by ID and add them to the list
userList.Add(PublicAPI.Portal.Security.User.Load(3));
userList.Add(PublicAPI.Portal.Security.User.Load(4));
//create an empty calendars list 
var calendars = new List<ISchedule>();
//event start date 
var startDate = DateTime.Now;
//event end date 
var endDate = DateTime.Now.AddDays(3);
//event subject 
var evtSubject = "Event Subject";
//event place 
var evtPlace = "Event Place";
//event description 
var evtDescription = "Event Description";

//create a reminder 
var newCalendarEvent = PublicAPI.Portal.Event.Create(users, calendars, startDate, endDate, evtSubject, evtPlace, evtDescription);

//newCalendarEvent - created reminder
See Also