From f0e0ec09ce69edbcc66b914d23b57d79636994b4 Mon Sep 17 00:00:00 2001 From: yubaolee Date: Sun, 7 May 2017 20:26:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=B8=E8=A7=84=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/FlowDesignController.cs | 1 - .../Controllers/FormDesignController.cs | 2 +- .../Controllers/UserManagerController.cs | 2 +- OpenAuth.Mvc/OpenAuth.Mvc.csproj | 4 -- OpenAuth.Mvc/WebCtrls/AjaxResult.cs | 58 ------------------- .../WebCtrls/GridTree/TreeGridEntity.cs | 20 ------- .../WebCtrls/GridTree/TreeGridJson.cs | 52 ----------------- OpenAuth.Mvc/WebCtrls/Pagination.cs | 55 ------------------ OpenAuth.Mvc/WebCtrls/Tree/TreeEntity.cs | 7 +-- OpenAuth.Mvc/WebCtrls/Tree/TreeJson.cs | 7 +-- 10 files changed, 5 insertions(+), 203 deletions(-) delete mode 100644 OpenAuth.Mvc/WebCtrls/AjaxResult.cs delete mode 100644 OpenAuth.Mvc/WebCtrls/GridTree/TreeGridEntity.cs delete mode 100644 OpenAuth.Mvc/WebCtrls/GridTree/TreeGridJson.cs delete mode 100644 OpenAuth.Mvc/WebCtrls/Pagination.cs diff --git a/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowDesignController.cs b/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowDesignController.cs index 76df252a..8bdc5377 100644 --- a/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowDesignController.cs +++ b/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowDesignController.cs @@ -4,7 +4,6 @@ using System.Data; using System.Web.Mvc; using System.Web.UI.WebControls; using Infrastructure; -using LeaRun.Util.WebControl; using OpenAuth.App; using OpenAuth.App.SSO; using OpenAuth.App.ViewModel; diff --git a/OpenAuth.Mvc/Areas/FlowManage/Controllers/FormDesignController.cs b/OpenAuth.Mvc/Areas/FlowManage/Controllers/FormDesignController.cs index 6a587d68..a5d3f157 100644 --- a/OpenAuth.Mvc/Areas/FlowManage/Controllers/FormDesignController.cs +++ b/OpenAuth.Mvc/Areas/FlowManage/Controllers/FormDesignController.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using System.Web.Mvc; using Infrastructure; -using LeaRun.Util.WebControl; using OpenAuth.App; using OpenAuth.App.SSO; using OpenAuth.Domain; using OpenAuth.Mvc.Controllers; +using OpenAuth.Mvc.WebCtrls.Tree; namespace OpenAuth.Mvc.Areas.FlowManage.Controllers { diff --git a/OpenAuth.Mvc/Controllers/UserManagerController.cs b/OpenAuth.Mvc/Controllers/UserManagerController.cs index 75a17f18..f19776fd 100644 --- a/OpenAuth.Mvc/Controllers/UserManagerController.cs +++ b/OpenAuth.Mvc/Controllers/UserManagerController.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Web.Mvc; using Infrastructure; -using LeaRun.Util.WebControl; using OpenAuth.App; using OpenAuth.App.ViewModel; using OpenAuth.Domain; using OpenAuth.Mvc.Models; +using OpenAuth.Mvc.WebCtrls.Tree; namespace OpenAuth.Mvc.Controllers { diff --git a/OpenAuth.Mvc/OpenAuth.Mvc.csproj b/OpenAuth.Mvc/OpenAuth.Mvc.csproj index 31fb8dd3..461573b4 100644 --- a/OpenAuth.Mvc/OpenAuth.Mvc.csproj +++ b/OpenAuth.Mvc/OpenAuth.Mvc.csproj @@ -167,10 +167,6 @@ - - - - diff --git a/OpenAuth.Mvc/WebCtrls/AjaxResult.cs b/OpenAuth.Mvc/WebCtrls/AjaxResult.cs deleted file mode 100644 index 112ae640..00000000 --- a/OpenAuth.Mvc/WebCtrls/AjaxResult.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace LeaRun.Util.WebControl -{ - /// - /// 表示Ajax操作结果 - /// - public class AjaxResult - { - /// - /// 获取 Ajax操作结果类型 - /// - public ResultType type { get; set; } - - /// - /// 获取 Ajax操作结果编码 - /// - public int errorcode { get; set; } - - /// - /// 获取 消息内容 - /// - public string message { get; set; } - - /// - /// 获取 返回数据 - /// - public object resultdata { get; set; } - } - /// - /// 表示 ajax 操作结果类型的枚举 - /// - public enum ResultType - { - /// - /// 消息结果类型 - /// - info = 0, - - /// - /// 成功结果类型 - /// - success = 1, - - /// - /// 警告结果类型 - /// - warning = 2, - - /// - /// 异常结果类型 - /// - error = 3 - } -} diff --git a/OpenAuth.Mvc/WebCtrls/GridTree/TreeGridEntity.cs b/OpenAuth.Mvc/WebCtrls/GridTree/TreeGridEntity.cs deleted file mode 100644 index f74ad4e2..00000000 --- a/OpenAuth.Mvc/WebCtrls/GridTree/TreeGridEntity.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace LeaRun.Util.WebControl -{ - /// - /// 树表格实体 - /// - public class TreeGridEntity - { - public string parentId { get; set; } - public string id { get; set; } - public string text { get; set; } - public string entityJson { get; set; } - public bool expanded { get; set; } - public bool hasChildren { get; set; } - } -} diff --git a/OpenAuth.Mvc/WebCtrls/GridTree/TreeGridJson.cs b/OpenAuth.Mvc/WebCtrls/GridTree/TreeGridJson.cs deleted file mode 100644 index 07485fac..00000000 --- a/OpenAuth.Mvc/WebCtrls/GridTree/TreeGridJson.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace LeaRun.Util.WebControl -{ - /// - /// 构造树形表格Json - /// - public static class TreeGridJson - { - public static int lft = 1, rgt = 1000000; - /// - /// 转换树形Json - /// - /// 数据源 - /// 父节点 - /// - public static string TreeJson(List ListData, int index, string ParentId) - { - StringBuilder sb = new StringBuilder(); - var ChildNodeList = ListData.FindAll(t => t.parentId == ParentId); - if (ChildNodeList.Count > 0) { index++; } - foreach (TreeGridEntity entity in ChildNodeList) - { - string strJson = entity.entityJson; - strJson = strJson.Insert(1, "\"level\":" + index + ","); - strJson = strJson.Insert(1, "\"isLeaf\":" + (entity.hasChildren == true ? false : true).ToString().ToLower() + ","); - strJson = strJson.Insert(1, "\"expanded\":" + (entity.expanded).ToString().ToLower() + ","); - strJson = strJson.Insert(1, "\"lft\":" + lft++ + ","); - strJson = strJson.Insert(1, "\"rgt\":" + rgt-- + ","); - sb.Append(strJson); - sb.Append(TreeJson(ListData, index, entity.id)); - } - return sb.ToString().Replace("}{", "},{"); - } - /// - /// 转换树形Json - /// - /// 数据源 - /// - public static string TreeJson(this List ListData) - { - StringBuilder sb = new StringBuilder(); - sb.Append("{ \"rows\": ["); - sb.Append(TreeJson(ListData, -1, "0")); - sb.Append("]}"); - return sb.ToString(); - } - } -} diff --git a/OpenAuth.Mvc/WebCtrls/Pagination.cs b/OpenAuth.Mvc/WebCtrls/Pagination.cs deleted file mode 100644 index f06d9667..00000000 --- a/OpenAuth.Mvc/WebCtrls/Pagination.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace LeaRun.Util.WebControl -{ - /// - /// 分页参数 - /// - public class Pagination - { - /// - /// 每页行数 - /// - public int rows { get; set; } - /// - /// 当前页 - /// - public int page { get; set; } - /// - /// 排序列 - /// - public string sidx { get; set; } - /// - /// 排序类型 - /// - public string sord { get; set; } - /// - /// 总记录数 - /// - public int records { get; set; } - /// - /// 总页数 - /// - public int total - { - get - { - if (records > 0) - { - return records % this.rows == 0 ? records / this.rows : records / this.rows + 1; - } - else - { - return 0; - } - } - } - /// - /// 查询条件Json - /// - public string conditionJson { get; set; } - } -} diff --git a/OpenAuth.Mvc/WebCtrls/Tree/TreeEntity.cs b/OpenAuth.Mvc/WebCtrls/Tree/TreeEntity.cs index f93a2f3f..b81097ea 100644 --- a/OpenAuth.Mvc/WebCtrls/Tree/TreeEntity.cs +++ b/OpenAuth.Mvc/WebCtrls/Tree/TreeEntity.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace LeaRun.Util.WebControl +namespace OpenAuth.Mvc.WebCtrls.Tree { /// /// 树实体 diff --git a/OpenAuth.Mvc/WebCtrls/Tree/TreeJson.cs b/OpenAuth.Mvc/WebCtrls/Tree/TreeJson.cs index 2af81a01..deb1269a 100644 --- a/OpenAuth.Mvc/WebCtrls/Tree/TreeJson.cs +++ b/OpenAuth.Mvc/WebCtrls/Tree/TreeJson.cs @@ -1,10 +1,7 @@ -using LeaRun.Util.WebControl; -using System; -using System.Collections.Generic; -using System.Linq; +using System.Collections.Generic; using System.Text; -namespace LeaRun.Util.WebControl +namespace OpenAuth.Mvc.WebCtrls.Tree { /// /// 构造树形Json