后台    
public ActionResult DoctorEvaluation()//前台页面 { HE_Department HE_dt = new HE_Department(); DataTable dt = HE_dt.GetDepartment();
//表转list 不知道怎么转请看 例子:http://www.cnblogs.com/LZXX/p/7763613.html List
<Entitys.HE_Department> list = DataTableToList.ConvertTo<Entitys.HE_Department>(dt).ToList();      ViewBag.GetDepartmentList = list; //转化为LIST可以直接在前台循环 return View(); }
  前台
@foreach (var list in ViewBag.GetDepartmentList) { <li>@list.DepartmentName</li> }

 

相关文章:

  • 2021-11-05
  • 2022-12-23
  • 2021-09-30
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
相关资源
相似解决方案