RoadFlow2.1 临时演示

Withdraw.aspx.cs 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. namespace WebForm.Platform.WorkFlowTasks
  8. {
  9. public partial class Withdraw : System.Web.UI.Page
  10. {
  11. protected void Page_Load(object sender, EventArgs e)
  12. {
  13. string taskid = Request.QueryString["taskid"];
  14. Guid tid;
  15. if (!taskid.IsGuid(out tid))
  16. {
  17. Response.Write("参数错误!");
  18. Response.End();
  19. }
  20. else if (new RoadFlow.Platform.WorkFlowTask().HasWithdraw(tid))
  21. {
  22. bool success = new RoadFlow.Platform.WorkFlowTask().WithdrawTask(tid);
  23. if (success)
  24. {
  25. RoadFlow.Platform.Log.Add("收回了任务", "任务ID:" + taskid, RoadFlow.Platform.Log.Types.流程相关);
  26. Response.Write("收回成功!");
  27. Response.End();
  28. }
  29. else
  30. {
  31. Response.Write("收回失败!");
  32. Response.End();
  33. }
  34. }
  35. else
  36. {
  37. Response.Write("该任务不能收回!");
  38. Response.End();
  39. }
  40. }
  41. }
  42. }