diff --git a/OpenAuth.Mvc/Controllers/OrgManagerController.cs b/OpenAuth.Mvc/Controllers/OrgManagerController.cs index e509389b..3b22b597 100644 --- a/OpenAuth.Mvc/Controllers/OrgManagerController.cs +++ b/OpenAuth.Mvc/Controllers/OrgManagerController.cs @@ -25,6 +25,11 @@ namespace OpenAuth.Mvc.Controllers return View(); } + public ActionResult LookupParent() + { + return View(); + } + public string LoadOrg() { diff --git a/OpenAuth.Mvc/OpenAuth.Mvc.csproj b/OpenAuth.Mvc/OpenAuth.Mvc.csproj index d42aede2..d610d182 100644 --- a/OpenAuth.Mvc/OpenAuth.Mvc.csproj +++ b/OpenAuth.Mvc/OpenAuth.Mvc.csproj @@ -610,6 +610,9 @@ + + + 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/OpenAuth.Mvc/Views/OrgManager/Index.cshtml b/OpenAuth.Mvc/Views/OrgManager/Index.cshtml index ae53ce81..81f11e79 100644 --- a/OpenAuth.Mvc/Views/OrgManager/Index.cshtml +++ b/OpenAuth.Mvc/Views/OrgManager/Index.cshtml @@ -1,11 +1,10 @@ 
-
+
    - -
    +
    @@ -22,19 +21,43 @@ gridTitle: '机构列表显示', showToolbar: true, toolbarItem: 'add, edit, refresh, |, del', + //toolbarCustom: '' + + // '', columns: [ { name: 'Id', - hide: true + label:'Id', + hide: true, + edit:false + }, + { + name: 'CascadeId', + label: '唯一标识', + edit:false }, { name: 'Name', - width: '150', label: '机构名称' }, + { + name: 'ParentName', + label: '上级机构', + type: 'lookup', + attrs: { 'data-url': 'OrgManager/LookupParent' } + }, + { + name: 'Status', + label: '禁用', + type: 'boolean', + align: 'center', + render: function (value) { + return (value && String(value) == 'true') ? + '' : '否' + + } + }, { name: 'CreateTime', - width: '120', label: '登记日期' } ], @@ -116,5 +139,12 @@ } return selected; } + + //自定义的编辑按钮 + function editOrg() { + var selected = getSelected(); + if (selected == null) return; + + } //@@ sourceURL=orgIndex.js \ No newline at end of file diff --git a/OpenAuth.Mvc/Views/OrgManager/LookupParent.cshtml b/OpenAuth.Mvc/Views/OrgManager/LookupParent.cshtml new file mode 100644 index 00000000..705cca14 --- /dev/null +++ b/OpenAuth.Mvc/Views/OrgManager/LookupParent.cshtml @@ -0,0 +1,60 @@ +@model dynamic + +@{ + ViewBag.Title = "title"; + Layout = null; +} +
    +
    +
      +
      +
      + + +