CollegeSelector.cshtml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "CollegeSelector";
  5. ComboGridOptions cgopCampus = new ComboGridOptions
  6. {
  7. TextField = "Name",
  8. ValueField = "CampusID",
  9. Name = "CampusDropdown",
  10. ID = "CampusDropdown",
  11. OnSelect = "reload",
  12. GridOptions = new DataGridOptions
  13. {
  14. Columns = new List<DataGridColumn>()
  15. {
  16. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center, Width=0.1 },
  17. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.12 }
  18. },
  19. IsCheckOnSelect = true,
  20. DataSourceUrl = Url.Content("~/Campus/List"),
  21. IsPagination = true,
  22. IsShowRowNumbers = true,
  23. IsSingleSelect = false
  24. }
  25. };
  26. }
  27. @section scripts{
  28. <script src="~/Scripts/Business/Common/CollegeSelect.js" type="text/javascript"></script>
  29. }
  30. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  31. <div class="p_title">
  32. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  33. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  34. <div class="current_navbar toolbar">
  35. <div class="func_info">
  36. <a class="easyui-linkbutton" href="javascript:College_Confirm()" data-options="iconCls:'icon-ok',plain:'true'"
  37. onfocus="this.blur()">选中</a>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <form id="formQuery" method="post">
  43. <div class="search_keyword">
  44. <div class="search_input">
  45. <ul>
  46. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("Campus"):</li>
  47. <li class="sv">
  48. @Html.ComboGrid(cgopCampus, new Dictionary<string, string> { { "data-condition", "dgCollegeList" } })
  49. </li>
  50. </ul>
  51. </div>
  52. </div>
  53. </form>
  54. <div class="search_list">
  55. @Html.DataGrid(new DataGridOptions
  56. {
  57. Columns = new List<DataGridColumn>()
  58. {
  59. new CheckBoxFieldColumn{ HeaderText="", FieldName="CollegeID" },
  60. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center , Handle="edit", Width=0.06 },
  61. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.12 },
  62. new BoundFieldColumn { FieldName="CampusNo", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center, Width=0.05 },
  63. new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.08 },
  64. new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.03, OverflowLength=6 }
  65. },
  66. IsCheckOnSelect = true,
  67. DataSourceUrl = Request["onlyCollege"] == "1" ? Url.Content("~/College/ListOnlyCollege") : Url.Content("~/College/List"),
  68. ID = "dgCollegeList",
  69. IsPagination = true,
  70. IsShowRowNumbers = true,
  71. IsSingleSelect = false
  72. })
  73. </div>
  74. </div>