private ActionResult query(FormCollection collection)
        {
            RoadFlow.Platform.OnlineUsers onlineUsers = new RoadFlow.Platform.OnlineUsers();
            string name = string.Empty;

            name = collection == null ? this.Request.QueryString["Name"] : this.Request.Form["Name"];
            // ISSUE: reference to a compiler-generated field
            if (OnlineUsersController.\u003C\u003Eo__2.\u003C\u003Ep__0 == null)
            {
                // ISSUE: reference to a compiler-generated field
                OnlineUsersController.\u003C\u003Eo__2.\u003C\u003Ep__0 = CallSite <Func <CallSite, object, string, object> > .Create(Binder.SetMember(CSharpBinderFlags.None, "Name", typeof(OnlineUsersController), (IEnumerable <CSharpArgumentInfo>) new CSharpArgumentInfo[2]
                {
                    CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string)null),
                    CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, (string)null)
                }));
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            object obj = OnlineUsersController.\u003C\u003Eo__2.\u003C\u003Ep__0.Target((CallSite)OnlineUsersController.\u003C\u003Eo__2.\u003C\u003Ep__0, this.ViewBag, name);
            List <RoadFlow.Data.Model.OnlineUsers> source = onlineUsers.GetAll();

            if (!name.IsNullOrEmpty())
            {
                source = source.Where <RoadFlow.Data.Model.OnlineUsers>((Func <RoadFlow.Data.Model.OnlineUsers, bool>)(p => p.UserName.IndexOf(name) >= 0)).ToList <RoadFlow.Data.Model.OnlineUsers>();
            }
            return((ActionResult)this.View((object)source));
        }
Esempio n. 2
0
        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();
            }
        }
        private ActionResult query(FormCollection collection)
        {
            RoadFlow.Platform.OnlineUsers bou = new RoadFlow.Platform.OnlineUsers();
            string name = string.Empty;

            if (collection != null)
            {
                name = Request.Form["Name"];
            }
            else
            {
                name = Request.QueryString["Name"];
            }
            ViewBag.Name = name;
            var userList = bou.GetAll();

            if (!name.IsNullOrEmpty())
            {
                userList = userList.Where(p => p.UserName.IndexOf(name) >= 0).ToList();
            }

            return(View(userList));
        }