SysStates.cshtml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. @using ContractService.Authorization
  2. @using ContractService.Configuration
  3. @using ContractService.Views.Shared.Modals
  4. @using ContractService.Views.Shared.Query
  5. @using ContractService.Views.Shared.SearchForm
  6. @using ContractService.Views.Shared.Table
  7. @{
  8. ViewBag.Title = L("StateTitle");
  9. string activeMenu = PermissionNames.PagesSystemMgStateMg; //The menu item will be active for this page.
  10. ViewBag.ActiveMenu = activeMenu;
  11. var table = new TableViewModel(IwbConsts.ApiAppUrl + "States/GetAll", activeMenu, new SearchFormViewModel(new List<SearchItem>()
  12. {
  13. //new SearchItem("dd", L("stateName")).SetSearchIcon("query_user","ddd"),
  14. //new SearchItem("ff", L("stateName")).SetSelectItem("<option value=\"\">000</option><option value=\"4\">111</option><option value=\"3\">222</option>").SetSearchIcon("query_user","fff"),
  15. new SearchItem("stateName", L("stateName")),
  16. new SearchItem("tableName", L("tableName")),
  17. new SearchItem("columnName", L("columnName"))
  18. })).SetFields(new List<FieldItem>()
  19. {
  20. new FieldItem("stateName", L("stateName")),
  21. new FieldItem("tableName", L("tableName")),
  22. new FieldItem("columnName",L("columnName")),
  23. new FieldItem("codeValue", L("codeValue")),
  24. new FieldItem("displayValue",L("displayValue")),
  25. });
  26. }
  27. @Html.Partial("Table/_Table", table)
  28. @section modal{
  29. <!--Main Modal-->
  30. @{
  31. var mb = new ModalBodyViewModel();
  32. var inputs = new List<Input>()
  33. {
  34. new InputHide("id"),
  35. new Input("stateName", L("stateName")),
  36. new Input("tableName", L("tableName")).SetReadonly(),
  37. new Input("columnName", L("columnName")).SetReadonly(),
  38. new Input("codeValue", L("codeValue")).SetReadonly(),
  39. new Input("displayValue", L("displayValue")),
  40. //new AjaxSelect("e", L("displayValue"),"User","UserName","q_u"),
  41. };
  42. mb.SetInputs(inputs);
  43. var modal = new ModalViewModel(L("state")).SetBody(mb);
  44. }
  45. @Html.Partial("Modals/_Modal", modal)
  46. @*@Html.Partial("Query/_User",new QuerySearchModel("q_u","e").SetOriginField("userName"))*@
  47. }
  48. @section scripts
  49. {
  50. @*<script src="~/Content/Plugins/PrintPreView/print-preview.js"></script>*@
  51. <script type="text/javascript">
  52. $(function() {
  53. LoadTable();
  54. //var funs = window.iwbfuns || { none: function() { console.log("No type"); } };
  55. //funs["btnUpdate"] = function() {
  56. // BtnUpdate();
  57. //};
  58. });
  59. //$('#print').printPreview({
  60. // printBody: ".table-box",
  61. // cssUrl: '../../Content/Plugins/bootstrap-3.3.7/css/bootstrap.css,../../Content/Css/Site.css'
  62. //});
  63. </script>
  64. <script id="formatter" type="text/javascript">
  65. </script>
  66. }