Ejemplo n.º 1
0
        public ActionResult HandleTable()
        {
            var handler  = new PowerTablesHandler <Toy, Row>(new Configurator <Toy, Row>().Configure());
            var statData = handler.ExtractStaticData <RequestStaticData>(ControllerContext);

            var req    = handler.ExtractRequest(ControllerContext);
            var shown  = req.GetShownColumns();
            var hidden = req.GetHiddenColumns();
            var form   = req.Form <AdditionalSearchData>();

            handler.AddCommandHandler("remove", Delete);
            handler.AddCommandHandler("download", DownloadSome);
            Thread.Sleep(1000);
            return(handler.Handle(Data.SourceData.AsQueryable(), ControllerContext));
        }
Ejemplo n.º 2
0
        public ActionResult FormWatchForAdditionalDataHandle()
        {
            var table   = new Configurator <Toy, Row>().FormWatchForAdditionalData();
            var handler = new PowerTablesHandler <Toy, Row>(table);

            var request = handler.ExtractRequest(ControllerContext);
            //var formValues = request.Form<FormWatchTutorialModel>();

            var q = Data.SourceData.AsQueryable();

            //if (!string.IsNullOrEmpty(formValues.GroupNamePart))
            //{
            //    q = q.Where(c => c.VeryName.StartsWith(formValues.GroupNamePart));
            //}

            return(handler.Handle(q, ControllerContext));
        }