RoadFlow2.1 临时演示

Default.aspx.cs 799B

1234567891011121314151617181920212223242526
  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.RoleApp
  8. {
  9. public partial class Default : Common.BasePage
  10. {
  11. protected List<RoadFlow.Data.Model.Role> RoleList = new List<RoadFlow.Data.Model.Role>();
  12. protected void Page_Load(object sender, EventArgs e)
  13. {
  14. RoleList = new RoadFlow.Platform.Role().GetAll();
  15. if (IsPostBack && !Request.Form["Search"].IsNullOrEmpty())
  16. {
  17. string name = Request.Form["Name"];
  18. if (!name.IsNullOrEmpty())
  19. {
  20. RoleList = RoleList.Where(p => p.Name.Contains(name)).ToList();
  21. }
  22. }
  23. }
  24. }
  25. }