Exemple #1
0
        public JsonResult CompletedTasks(GridItemsRequestModel input)
        {
            var items              = _dynamicExpressionQuery.PerformQuery <Task>(input.filters, x => x.Complete);
            var employeeItems      = items.ToList().Where(x => x.GetEmployees().Any(y => y.EntityId == input.ParentId)).AsQueryable();
            var gridItemsViewModel = _completedTaskGrid.GetGridItemsViewModel(input.PageSortFilter, employeeItems, "completeGridContainer");

            return(Json(gridItemsViewModel, JsonRequestBehavior.AllowGet));
        }
        public JsonResult CompletedTasks(GridItemsRequestModel input)
        {
            var items = _dynamicExpressionQuery.PerformQuery <Task>(input.filters,
                                                                    x => x.Field.EntityId == input.ParentId && x.Complete);
            var gridItemsViewModel = _completedTaskGrid.GetGridItemsViewModel(input.PageSortFilter, items,
                                                                              "completeGridContainer");

            return(Json(gridItemsViewModel, JsonRequestBehavior.AllowGet));
        }
Exemple #3
0
        public JsonResult Employees(GridItemsRequestModel input)
        {
            var items = _dynamicExpressionQuery.PerformQuery <Employee>(input.filters);
            var gridItemsViewModel = _employeeListGrid.GetGridItemsViewModel(input.PageSortFilter, items);

            return(Json(gridItemsViewModel, JsonRequestBehavior.AllowGet));
        }
Exemple #4
0
        public JsonResult ListTypes(GridItemsRequestModel input)
        {
            var items = _dynamicExpressionQuery.PerformQuery <LISTTYPE>(input.filters);
            var gridItemsViewModel = _listTypeListGrid.GetGridItemsViewModel(input.PageSortFilter, items, typeof(LISTTYPE).Name + "Grid");

            return(Json(gridItemsViewModel, JsonRequestBehavior.AllowGet));
        }
Exemple #5
0
        public JsonResult VendorContacts(GridItemsRequestModel input)
        {
            var items = _dynamicExpressionQuery.PerformQuery <VendorContact>(input.filters, x => x.Vendor.EntityId == input.ParentId);
            var gridItemsViewModel = _vendorContactListGrid.GetGridItemsViewModel(input.PageSortFilter, items);

            return(Json(gridItemsViewModel, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Products(InventoryProductGridItemsRequestModel input)
        {
            var items = _dynamicExpressionQuery.PerformQuery <InventoryProduct>(input.filters, x => x.Product.InstantiatingType == input.ProductType);
            var gridItemsViewModel = _inventoryProductListGrid.GetGridItemsViewModel(input.PageSortFilter, items);

            return(Json(gridItemsViewModel, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Photos(GridItemsRequestModel input)
        {
            var items = _dynamicExpressionQuery.PerformQuery <Photo>();
            var gridItemsViewModel = _photoListGrid.GetGridItemsViewModel(input.PageSortFilter, items);

            return(Json(gridItemsViewModel, JsonRequestBehavior.AllowGet));
        }
Exemple #8
0
        public JsonResult Vendors(GridItemsRequestModel input)
        {
            var items = _dynamicExpressionQuery.PerformQuery <Vendor>();
            Action <IGridColumn, Vendor> mod = (c, v) =>
            {
                if (c.GetType() == typeof(ImageButtonColumn <Vendor>) && c.ColumnIndex == 10)
                {
                    var col = (ImageButtonColumn <Vendor>)c;
                    col.AddActionUrlParameters(new Dictionary <string, string> {
                        { "ParentId", v.EntityId.ToString() }
                    });
                }
            };

            _vendorListGrid.AddColumnModifications(mod);
            var gridItemsViewModel = _vendorListGrid.GetGridItemsViewModel(input.PageSortFilter, items);

            return(Json(gridItemsViewModel, JsonRequestBehavior.AllowGet));
        }