Ejemplo n.º 1
0
        public IActionResult GetFilters(Parameters parameters)
        {
            try
            {
                PomasLogic pomasLogic = new PomasLogic(this._dataContext);

                var List = pomasLogic.GetData(parameters.TipoExportar);

                List = pomasLogic.GetFilter(List, parameters);

                return(Ok(new { Data = List, Success = true }));
            }catch (Exception ex)
            {
                return(BadRequest(new { Data = ex.Message, Success = false }));
            }
        }
Ejemplo n.º 2
0
        public object Get()
        {
            List <object> retList = new List <object>();

            PomasLogic pomasLogic = new PomasLogic(this._dataContext);
            var        List       = pomasLogic.GetData();

            List.ToList().ForEach(x =>
            {
                List <int> palets = x.Frutas.Select(s => s.IdPallet).ToList();
                if (!_dataContext.Tracking.Where(a => palets.Contains(a.Palet.ID)).Any())
                {
                    retList.Add(x);
                }
            });

            return(retList);
        }