Exemplo n.º 1
0
        public void LoadItems(object sender = null)
        {
            string search = sender?.ToString() ?? string.Empty;

            IsBusy = true;

            Task.Run(async() =>
            {
                POCO.MstItemFilter itemFilter = null;

                if (!string.IsNullOrEmpty(search))
                {
                    itemFilter = new MstItemFilter()
                    {
                        ItemDescription = search,
                        filterMethods   = new FilterMethods()
                        {
                            Operations = new List <FilterOperation>()
                            {
                                new FilterOperation("ItemDescription", Operation.Contains)
                            }
                        }
                    };
                }

                Items = await ApiRequest <POCO.MstItemFilter, ObservableCollection <POCO.MstItem> >
                        .PostRead("MstItem/BulkGet", itemFilter);

                IsBusy = false;
            });
        }
Exemplo n.º 2
0
        public JsonResult BulkGet(MstItemFilter content)
        {
            var repos  = new Repository.MstItem();
            var result = content.FilterMethods == null
                ? repos.BulkRead()
                : repos.BulkRead(content, content.FilterMethods);

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