有人可以帮我解决这个问题吗?我已经创建了两个表的链接,我想将其导出到Microsoft Word,但是我不知道该怎么做。
RegistStudentRegist = pro.RegistStudentRegist,
TrainerID = pro.Trainer,
CourseID = pro.CourseID,
StudentName = sup.StudentName,
StudentMobile = sup.StudentMobile,
StudentNoId = sup.StudentNoId,
RegistStudentNote = pro.RegistStudentNote
}).ToList();//convert to List
foreach (var item in innerJoinQuery)
{
RegistStudentVM objcvm = new RegistStudentVM(); // ViewModel
objcvm.RegistStudentRegist = item.RegistStudentRegist;
objcvm.Trainer = item.TrainerID;
objcvm.CourseID = item.CourseID;
objcvm.StudentName = item.StudentName;
objcvm.StudentMobile = item.StudentMobile;
objcvm.StudentNoId = item.StudentNoId;
objcvm.RegistStudentNote = item.RegistStudentNote;
RegistStudentVMlist.Add(objcvm);
}
ViewBag.RStudentID = new SelectList(db.Courses, "CourseID", "CourseName");
return View(RegistStudentVMlist);
}