private void TaskCreation(object sender, EventArgs e) { try { if (taskProperties == null) { taskProperties = new Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties(); } //Task must have a guid TaskID = Guid.NewGuid(); //Setting up the basic task properties taskProperties.PercentComplete = (float)0.0; taskProperties.AssignedTo = System.Threading.Thread.CurrentPrincipal.Identity.Name; //This is really useful when incorporating InfoPath forms taskProperties.TaskType = 0; taskProperties.DueDate = DateTime.Now.AddDays(7); taskProperties.StartDate = DateTime.Now; taskProperties.Title = "SharePoint Workflow Task"; } catch (Exception ex) { } }
private void TaskCreation(object sender, EventArgs e) { try { if (taskProperties == null) { taskProperties = new Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties(); } //任务必须具有 GUID TaskID = Guid.NewGuid(); //设置基本任务属性 taskProperties.PercentComplete = (float)0.0; taskProperties.AssignedTo = System.Threading.Thread.CurrentPrincipal.Identity.Name; //这在合并 InfoPath 窗体时非常有用 taskProperties.TaskType = 0; taskProperties.DueDate = DateTime.Now.AddDays(7); taskProperties.StartDate = DateTime.Now; taskProperties.Title = "SharePoint Workflow Task"; } catch (Exception ex) { } }
private void createTaskWithContentType1_MethodInvoking(object sender, EventArgs e) { createTaskWithContentType1_TaskId1 = Guid.NewGuid(); createTaskWithContentType1_ContentTypeId1 = ContentTypeId; createTaskWithContentType1_TaskProperties1 = TaskProperties; //HybridDictionary permsCollection = new HybridDictionary(); //permsCollection.Add(createTaskWithContentType1_TaskProperties1.AssignedTo, SPRoleType.Contributor); //createTaskWithContentType1.SpecialPermissions = permsCollection; }