public ActionResult Index(FormCollection collection) { RoadFlow.Platform.OnlineUsers onlineUsers = new RoadFlow.Platform.OnlineUsers(); if (!this.Request.Form["ClearAll"].IsNullOrEmpty()) { onlineUsers.RemoveAll(); } if (!this.Request.Form["ClearSelect"].IsNullOrEmpty()) { string str1 = this.Request.Form["checkbox_app"]; if (!str1.IsNullOrEmpty()) { string str2 = str1; char[] chArray = new char[1] { ',' }; foreach (string str3 in str2.Split(chArray)) { Guid test; if (str3.IsGuid(out test)) { onlineUsers.Remove(test); } } } } return(this.query(collection)); }
public ActionResult Index(FormCollection collection) { RoadFlow.Platform.OnlineUsers bou = new RoadFlow.Platform.OnlineUsers(); if (!Request.Form["ClearAll"].IsNullOrEmpty()) { bou.RemoveAll(); } if (!Request.Form["ClearSelect"].IsNullOrEmpty()) { string userids = Request.Form["checkbox_app"]; if (!userids.IsNullOrEmpty()) { foreach (string userid in userids.Split(',')) { Guid uid; if (userid.IsGuid(out uid)) { bou.Remove(uid); } } } } return(query(collection)); }
protected void Page_Load(object sender, EventArgs e) { RoadFlow.Platform.OnlineUsers bou = new RoadFlow.Platform.OnlineUsers(); string name = string.Empty; if (IsPostBack) { name = Request.Form["Name"]; if (!Request.Form["ClearAll"].IsNullOrEmpty()) { bou.RemoveAll(); } if (!Request.Form["ClearSelect"].IsNullOrEmpty()) { string userids = Request.Form["checkbox_app"]; if (!userids.IsNullOrEmpty()) { foreach (string userid in userids.Split(',')) { Guid uid; if (userid.IsGuid(out uid)) { bou.Remove(uid); } } } } } else { name = Request.QueryString["Name"]; } UserList = bou.GetAll(); this.Count.Text = UserList.Count.ToString(); if (!name.IsNullOrEmpty()) { UserList = UserList.Where(p => p.UserName.IndexOf(name) >= 0).ToList(); } }