Aggiungere un Meeting Workspace
L'esempio mostra come aggiungere via codice, in SharePoint 2007 (WSS3 - MOSS), un meeting workspace ad un evento calendario già esistente.
C#
//add Meeting Workspace to existing event
using (SPSite site = new SPSite(url))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["Events"];
using (SPWeb webMeet = site.OpenWeb("aaa"))
{
//event id
int itemId = 7;
//SPFieldCrossProjectLink
SPField fldWorkspaceLink = list.Fields[SPBuiltInFieldId.WorkspaceLink];
//SPFieldUrl
SPField fldWorkspace = list.Fields[SPBuiltInFieldId.Workspace];
//Microsoft.SharePoint.Meetings
SPMeeting meet = SPMeeting.GetMeetingInformation(webMeet);
string u = meet.LinkWithEvent(web
, list.ID.ToString("B")
, itemId
, fldWorkspaceLink.InternalName
, fldWorkspace.InternalName);
}
}
}