public IActionResult Post(StudentRegisterRequest request) { List <StudentSearchResponse> list = StudentService.GetListBykeyWord(""); string[] header = new string[] { "ID", "学生姓名", "年龄", "性别ID", "性别", "出生年月", "手机号", "校区名称" }; NPOIExcelExport excelExport = new NPOIExcelExport(); excelExport.Add <StudentSearchResponse>(list, header); return(excelExport.DownloadToFile(this, "学生资料")); }
public FileResult GetStudentLessonsExport([FromQuery] LifeClassLessonStudentSearchRequest request) { LifeClassService service = new LifeClassService(base.SchoolId); List <LifeClassLessonStudentExportResponse> list = service.GetStudentLessonsExport(request); string[] header = new string[] { "学生姓名", "性别", "出生日期", "证件类型", "证件号码", "班级代码" }; NPOIExcelExport excelExport = new NPOIExcelExport(); excelExport.Add(list, header); return(excelExport.DownloadToFile(this, "写生排课")); }