Example #1
0
        public async Task <FileResult> GetDatosEmpleadosPdf(int id, string nombreEmpleado)
        {
            var res = await ReportesRh.GetDatosEmpleadosPdfAsync(id);

            var nombreArchivo = $"{nombreEmpleado} {id}.pdf";

            return(File(res, System.Net.Mime.MediaTypeNames.Application.Octet, nombreArchivo));
        }
Example #2
0
        public JsonResult ReporteEmpleados(int idEmpresa = 0, int idSucursal = 0, int status = 0)
        {
            if (idEmpresa == null)
            {
                return(Json(new { success = false, error = "Debe seleccionar el año del ejercicio fiscal", resultPath = "" }, JsonRequestBehavior.AllowGet));
            }

            var archivoReporte = "";
            int idUsuario      = SessionHelpers.GetIdUsuario();

            var ruta         = Server.MapPath("~/Files/EmpleadosA");
            var pathDescarga = "/Files/EmpleadosA/";

            archivoReporte = ReportesRh.ReporteEmpleados(idUsuario, ruta, pathDescarga, idEmpresa, idSucursal, status);

            return(Json(new { success = true, error = "", resultPath = archivoReporte }, JsonRequestBehavior.AllowGet));
        }