Exemple #1
0
        public FileResult Export(WarningFilter filter)
        {
            var response = _warningService.Filter(filter);

            var csv = new CsvExport();

            csv.ConcatRow(0, "CÓDIGO,ADVERTENCIA,ENFERMEDAD,ESTADO");
            csv.ConcatRows(0, "Code,Name,Disease,Status", response.Warnings);

            var stream = csv.RetrieveFile();

            return(new StreamFactory().Csv(stream, "Advertencias"));
        }
Exemple #2
0
        public JsonResult Filter(WarningFilter filter)
        {
            var response = _warningService.Filter(filter);

            return(new JsonFactory().Success(response.Warnings, response.TotalRecords));
        }