RoadFlow2.1 临时演示

SortUsers.aspx.cs 1.2KB

1234567891011121314151617181920212223242526272829303132333435
  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.Members
  8. {
  9. public partial class SortUsers : Common.BasePage
  10. {
  11. protected List<RoadFlow.Data.Model.Users> Users = new List<RoadFlow.Data.Model.Users>();
  12. protected void Page_Load(object sender, EventArgs e)
  13. {
  14. string parentID = Request.QueryString["parentid"];
  15. if (IsPostBack)
  16. {
  17. string sort = Request.Form["sort"] ?? "";
  18. string[] sortArray = sort.Split(',');
  19. RoadFlow.Platform.Users busers = new RoadFlow.Platform.Users();
  20. for (int i = 0; i < sortArray.Length; i++)
  21. {
  22. Guid gid;
  23. if (!sortArray[i].IsGuid(out gid))
  24. {
  25. continue;
  26. }
  27. busers.UpdateSort(gid, i + 1);
  28. }
  29. Page.ClientScript.RegisterStartupScript(Page.GetType(), "ok", "parent.frames[0].reLoad('" + parentID + "');", true);
  30. }
  31. Users = new RoadFlow.Platform.Organize().GetAllUsers(parentID.ToGuid());
  32. }
  33. }
  34. }