RoadFlow2.1 临时演示

Default.aspx.cs 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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.WorkFlowComments
  8. {
  9. public partial class Default : Common.BasePage
  10. {
  11. protected bool isOneSelf = false;
  12. protected string query1 = string.Empty;
  13. protected IEnumerable<RoadFlow.Data.Model.WorkFlowComment> workFlowCommentList;
  14. protected RoadFlow.Platform.Organize borganize = new RoadFlow.Platform.Organize();
  15. protected void Page_Load(object sender, EventArgs e)
  16. {
  17. RoadFlow.Platform.WorkFlowComment bworkFlowComment = new RoadFlow.Platform.WorkFlowComment();
  18. RoadFlow.Platform.Organize borganize = new RoadFlow.Platform.Organize();
  19. query1 = string.Format("&appid={0}&tabid={1}&isoneself={2}", Request.QueryString["appid"], Request.QueryString["tabid"], Request.QueryString["isoneself"]);
  20. if (IsPostBack)
  21. {
  22. if (!Request.Form["DeleteBut"].IsNullOrEmpty())
  23. {
  24. string ids = Request.Form["checkbox_app"];
  25. foreach (string id in ids.Split(','))
  26. {
  27. Guid bid;
  28. if (!id.IsGuid(out bid))
  29. {
  30. continue;
  31. }
  32. var comment = bworkFlowComment.Get(bid);
  33. if (comment != null)
  34. {
  35. bworkFlowComment.Delete(bid);
  36. RoadFlow.Platform.Log.Add("删除了流程意见", comment.Serialize(), RoadFlow.Platform.Log.Types.流程相关);
  37. }
  38. }
  39. bworkFlowComment.RefreshCache();
  40. }
  41. }
  42. workFlowCommentList = bworkFlowComment.GetAll();
  43. isOneSelf = "1" == Request.QueryString["isoneself"];
  44. if (isOneSelf)
  45. {
  46. workFlowCommentList = workFlowCommentList.Where(p => p.MemberID == RoadFlow.Platform.Users.PREFIX + RoadFlow.Platform.Users.CurrentUserID.ToString());
  47. }
  48. }
  49. }
  50. }