我已在Visual Studio中创建Sharepoint批准2010工作流程。Sharepoint批准工作批准批准按钮
如果用户点击批准或拒绝按钮,我该如何捕捉?
private void createTaskWithContentType1_MethodInvoking(object sender, EventArgs e)
{
createTaskWithContentType1_ContentTypeId1 = "0x01080100C9C9515DE4E24001905074F980F93160003A15057E2AF34B67B32E14B94EB70409";
createTaskWithContentType1_TaskId1 = Guid.NewGuid();
createTaskWithContentType1_TaskProperties1.AssignedTo = workflowProperties.Web.SiteAdministrators[0].LoginName;
createTaskWithContentType1_TaskProperties1.DueDate = DateTime.Now.AddDays(1.0F);
createTaskWithContentType1_TaskProperties1.Title = "Approval Required for xx";
createTaskWithContentType1_TaskProperties1.Description = "Specify the approval result here.";
SPList taskList = workflowProperties.TaskList;
}
private void onTaskChanged1_Invoked(object sender, ExternalDataEventArgs e)
{
//我想在这里,我必须以某种方式做:如果按钮点击批准其他....如果拒绝按钮点击 }
你是对的。你必须在AfterProperties和ExtendedProperties中检查你的值。您可以从Microsoft获得有关任务活动的完整示例:[从SharePoint 2010工作流创建多个任务](https://msdn.microsoft.com/zh-cn/library/office/hh128696(v = office.14).aspx ) – Nico