Przeglądaj źródła

新增权限表

zhoufan 8 lat temu
rodzic
commit
d779b73620

+ 3 - 0
CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj

@@ -105,8 +105,11 @@
105 105
     <Compile Include="T_Sys_IVRWords.cs" />
106 106
     <Compile Include="T_Sys_LoginLogs.cs" />
107 107
     <Compile Include="T_Sys_MobileData.cs" />
108
+    <Compile Include="T_Sys_ModuleInfo.cs" />
109
+    <Compile Include="T_Sys_ModuleInfoButton.cs" />
108 110
     <Compile Include="T_Sys_RoleFunction.cs" />
109 111
     <Compile Include="T_Sys_RoleInfo.cs" />
112
+    <Compile Include="T_Sys_RoleModule.cs" />
110 113
     <Compile Include="T_Sys_SeatGroup.cs" />
111 114
     <Compile Include="T_Sys_SeatPermissionConfig.cs" />
112 115
     <Compile Include="T_Sys_SystemConfig.cs" />

+ 145 - 0
CallCenterApi/CallCenterApi.BLL/T_Sys_ModuleInfo.cs

@@ -0,0 +1,145 @@
1
+using System;
2
+using System.Data;
3
+using System.Collections.Generic;
4
+using CallCenterApi.Model;
5
+namespace CallCenterApi.BLL
6
+{
7
+    /// <summary>
8
+    /// T_Sys_ModuleInfo
9
+    /// </summary>
10
+    public partial class T_Sys_ModuleInfo
11
+    {
12
+        private readonly CallCenterApi.DAL.T_Sys_ModuleInfo dal = new CallCenterApi.DAL.T_Sys_ModuleInfo();
13
+        public T_Sys_ModuleInfo()
14
+        { }
15
+        #region  BasicMethod
16
+        /// <summary>
17
+        /// 是否存在该记录
18
+        /// </summary>
19
+        public bool Exists(string code)
20
+        {
21
+            return dal.Exists(code);
22
+        }
23
+
24
+        /// <summary>
25
+        /// 增加一条数据
26
+        /// </summary>
27
+        public long Add(CallCenterApi.Model.T_Sys_ModuleInfo model)
28
+        {
29
+            return dal.Add(model);
30
+        }
31
+
32
+        /// <summary>
33
+        /// 更新一条数据
34
+        /// </summary>
35
+        public bool Update(CallCenterApi.Model.T_Sys_ModuleInfo model)
36
+        {
37
+            return dal.Update(model);
38
+        }
39
+
40
+        /// <summary>
41
+        /// 删除一条数据
42
+        /// </summary>
43
+        public bool Delete(long F_Id)
44
+        {
45
+
46
+            return dal.Delete(F_Id);
47
+        }
48
+        /// <summary>
49
+        /// 删除一条数据
50
+        /// </summary>
51
+        public bool DeleteList(string F_Idlist)
52
+        {
53
+            return dal.DeleteList(F_Idlist);
54
+        }
55
+
56
+        /// <summary>
57
+        /// 得到一个对象实体
58
+        /// </summary>
59
+        public CallCenterApi.Model.T_Sys_ModuleInfo GetModel(long F_Id)
60
+        {
61
+
62
+            return dal.GetModel(F_Id);
63
+        }
64
+
65
+        /// <summary>
66
+        /// 获得数据列表
67
+        /// </summary>
68
+        public DataSet GetList(string strWhere)
69
+        {
70
+            return dal.GetList(strWhere);
71
+        }
72
+        /// <summary>
73
+        /// 获得前几行数据
74
+        /// </summary>
75
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
76
+        {
77
+            return dal.GetList(Top, strWhere, filedOrder);
78
+        }
79
+        /// <summary>
80
+        /// 获得数据列表
81
+        /// </summary>
82
+        public List<CallCenterApi.Model.T_Sys_ModuleInfo> GetModelList(string strWhere)
83
+        {
84
+            DataSet ds = dal.GetList(strWhere);
85
+            return DataTableToList(ds.Tables[0]);
86
+        }
87
+        /// <summary>
88
+        /// 获得数据列表
89
+        /// </summary>
90
+        public List<CallCenterApi.Model.T_Sys_ModuleInfo> DataTableToList(DataTable dt)
91
+        {
92
+            List<CallCenterApi.Model.T_Sys_ModuleInfo> modelList = new List<CallCenterApi.Model.T_Sys_ModuleInfo>();
93
+            int rowsCount = dt.Rows.Count;
94
+            if (rowsCount > 0)
95
+            {
96
+                CallCenterApi.Model.T_Sys_ModuleInfo model;
97
+                for (int n = 0; n < rowsCount; n++)
98
+                {
99
+                    model = dal.DataRowToModel(dt.Rows[n]);
100
+                    if (model != null)
101
+                    {
102
+                        modelList.Add(model);
103
+                    }
104
+                }
105
+            }
106
+            return modelList;
107
+        }
108
+
109
+        /// <summary>
110
+        /// 获得数据列表
111
+        /// </summary>
112
+        public DataSet GetAllList()
113
+        {
114
+            return GetList("");
115
+        }
116
+
117
+        /// <summary>
118
+        /// 分页获取数据列表
119
+        /// </summary>
120
+        public int GetRecordCount(string strWhere)
121
+        {
122
+            return dal.GetRecordCount(strWhere);
123
+        }
124
+        /// <summary>
125
+        /// 分页获取数据列表
126
+        /// </summary>
127
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
128
+        {
129
+            return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
130
+        }
131
+        /// <summary>
132
+        /// 分页获取数据列表
133
+        /// </summary>
134
+        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
135
+        //{
136
+        //return dal.GetList(PageSize,PageIndex,strWhere);
137
+        //}
138
+
139
+        #endregion  BasicMethod
140
+        #region  ExtensionMethod
141
+
142
+        #endregion  ExtensionMethod
143
+    }
144
+}
145
+

+ 145 - 0
CallCenterApi/CallCenterApi.BLL/T_Sys_ModuleInfoButton.cs

@@ -0,0 +1,145 @@
1
+using System;
2
+using System.Data;
3
+using System.Collections.Generic;
4
+using CallCenterApi.Model;
5
+namespace CallCenterApi.BLL
6
+{
7
+    /// <summary>
8
+    /// 模块按钮
9
+    /// </summary>
10
+    public partial class T_Sys_ModuleInfoButton
11
+    {
12
+        private readonly CallCenterApi.DAL.T_Sys_ModuleInfoButton dal = new CallCenterApi.DAL.T_Sys_ModuleInfoButton();
13
+        public T_Sys_ModuleInfoButton()
14
+        { }
15
+        #region  BasicMethod
16
+        /// <summary>
17
+        /// 是否存在该记录
18
+        /// </summary>
19
+        public bool Exists(string code)
20
+        {
21
+            return dal.Exists(code);
22
+        }
23
+
24
+        /// <summary>
25
+        /// 增加一条数据
26
+        /// </summary>
27
+        public long Add(CallCenterApi.Model.T_Sys_ModuleInfoButton model)
28
+        {
29
+            return dal.Add(model);
30
+        }
31
+
32
+        /// <summary>
33
+        /// 更新一条数据
34
+        /// </summary>
35
+        public bool Update(CallCenterApi.Model.T_Sys_ModuleInfoButton model)
36
+        {
37
+            return dal.Update(model);
38
+        }
39
+
40
+        /// <summary>
41
+        /// 删除一条数据
42
+        /// </summary>
43
+        public bool Delete(long F_Id)
44
+        {
45
+
46
+            return dal.Delete(F_Id);
47
+        }
48
+        /// <summary>
49
+        /// 删除一条数据
50
+        /// </summary>
51
+        public bool DeleteList(string F_Idlist)
52
+        {
53
+            return dal.DeleteList(F_Idlist);
54
+        }
55
+
56
+        /// <summary>
57
+        /// 得到一个对象实体
58
+        /// </summary>
59
+        public CallCenterApi.Model.T_Sys_ModuleInfoButton GetModel(long F_Id)
60
+        {
61
+
62
+            return dal.GetModel(F_Id);
63
+        }
64
+
65
+        /// <summary>
66
+        /// 获得数据列表
67
+        /// </summary>
68
+        public DataSet GetList(string strWhere)
69
+        {
70
+            return dal.GetList(strWhere);
71
+        }
72
+        /// <summary>
73
+        /// 获得前几行数据
74
+        /// </summary>
75
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
76
+        {
77
+            return dal.GetList(Top, strWhere, filedOrder);
78
+        }
79
+        /// <summary>
80
+        /// 获得数据列表
81
+        /// </summary>
82
+        public List<CallCenterApi.Model.T_Sys_ModuleInfoButton> GetModelList(string strWhere)
83
+        {
84
+            DataSet ds = dal.GetList(strWhere);
85
+            return DataTableToList(ds.Tables[0]);
86
+        }
87
+        /// <summary>
88
+        /// 获得数据列表
89
+        /// </summary>
90
+        public List<CallCenterApi.Model.T_Sys_ModuleInfoButton> DataTableToList(DataTable dt)
91
+        {
92
+            List<CallCenterApi.Model.T_Sys_ModuleInfoButton> modelList = new List<CallCenterApi.Model.T_Sys_ModuleInfoButton>();
93
+            int rowsCount = dt.Rows.Count;
94
+            if (rowsCount > 0)
95
+            {
96
+                CallCenterApi.Model.T_Sys_ModuleInfoButton model;
97
+                for (int n = 0; n < rowsCount; n++)
98
+                {
99
+                    model = dal.DataRowToModel(dt.Rows[n]);
100
+                    if (model != null)
101
+                    {
102
+                        modelList.Add(model);
103
+                    }
104
+                }
105
+            }
106
+            return modelList;
107
+        }
108
+
109
+        /// <summary>
110
+        /// 获得数据列表
111
+        /// </summary>
112
+        public DataSet GetAllList()
113
+        {
114
+            return GetList("");
115
+        }
116
+
117
+        /// <summary>
118
+        /// 分页获取数据列表
119
+        /// </summary>
120
+        public int GetRecordCount(string strWhere)
121
+        {
122
+            return dal.GetRecordCount(strWhere);
123
+        }
124
+        /// <summary>
125
+        /// 分页获取数据列表
126
+        /// </summary>
127
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
128
+        {
129
+            return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
130
+        }
131
+        /// <summary>
132
+        /// 分页获取数据列表
133
+        /// </summary>
134
+        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
135
+        //{
136
+        //return dal.GetList(PageSize,PageIndex,strWhere);
137
+        //}
138
+
139
+        #endregion  BasicMethod
140
+        #region  ExtensionMethod
141
+
142
+        #endregion  ExtensionMethod
143
+    }
144
+}
145
+

+ 145 - 0
CallCenterApi/CallCenterApi.BLL/T_Sys_RoleModule.cs

@@ -0,0 +1,145 @@
1
+using System;
2
+using System.Data;
3
+using System.Collections.Generic;
4
+using CallCenterApi.Model;
5
+namespace CallCenterApi.BLL
6
+{
7
+    /// <summary>
8
+    /// T_Sys_RoleModule
9
+    /// </summary>
10
+    public partial class T_Sys_RoleModule
11
+    {
12
+        private readonly CallCenterApi.DAL.T_Sys_RoleModule dal = new CallCenterApi.DAL.T_Sys_RoleModule();
13
+        public T_Sys_RoleModule()
14
+        { }
15
+        #region  BasicMethod
16
+        /// <summary>
17
+        /// 是否存在该记录
18
+        /// </summary>
19
+        public bool Exists(long F_Id)
20
+        {
21
+            return dal.Exists(F_Id);
22
+        }
23
+
24
+        /// <summary>
25
+        /// 增加一条数据
26
+        /// </summary>
27
+        public long Add(CallCenterApi.Model.T_Sys_RoleModule model)
28
+        {
29
+            return dal.Add(model);
30
+        }
31
+
32
+        /// <summary>
33
+        /// 更新一条数据
34
+        /// </summary>
35
+        public bool Update(CallCenterApi.Model.T_Sys_RoleModule model)
36
+        {
37
+            return dal.Update(model);
38
+        }
39
+
40
+        /// <summary>
41
+        /// 删除一条数据
42
+        /// </summary>
43
+        public bool Delete(long F_Id)
44
+        {
45
+
46
+            return dal.Delete(F_Id);
47
+        }
48
+        /// <summary>
49
+        /// 删除一条数据
50
+        /// </summary>
51
+        public bool DeleteList(string F_Idlist)
52
+        {
53
+            return dal.DeleteList(F_Idlist);
54
+        }
55
+
56
+        /// <summary>
57
+        /// 得到一个对象实体
58
+        /// </summary>
59
+        public CallCenterApi.Model.T_Sys_RoleModule GetModel(long F_Id)
60
+        {
61
+
62
+            return dal.GetModel(F_Id);
63
+        }
64
+
65
+        /// <summary>
66
+        /// 获得数据列表
67
+        /// </summary>
68
+        public DataSet GetList(string strWhere)
69
+        {
70
+            return dal.GetList(strWhere);
71
+        }
72
+        /// <summary>
73
+        /// 获得前几行数据
74
+        /// </summary>
75
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
76
+        {
77
+            return dal.GetList(Top, strWhere, filedOrder);
78
+        }
79
+        /// <summary>
80
+        /// 获得数据列表
81
+        /// </summary>
82
+        public List<CallCenterApi.Model.T_Sys_RoleModule> GetModelList(string strWhere)
83
+        {
84
+            DataSet ds = dal.GetList(strWhere);
85
+            return DataTableToList(ds.Tables[0]);
86
+        }
87
+        /// <summary>
88
+        /// 获得数据列表
89
+        /// </summary>
90
+        public List<CallCenterApi.Model.T_Sys_RoleModule> DataTableToList(DataTable dt)
91
+        {
92
+            List<CallCenterApi.Model.T_Sys_RoleModule> modelList = new List<CallCenterApi.Model.T_Sys_RoleModule>();
93
+            int rowsCount = dt.Rows.Count;
94
+            if (rowsCount > 0)
95
+            {
96
+                CallCenterApi.Model.T_Sys_RoleModule model;
97
+                for (int n = 0; n < rowsCount; n++)
98
+                {
99
+                    model = dal.DataRowToModel(dt.Rows[n]);
100
+                    if (model != null)
101
+                    {
102
+                        modelList.Add(model);
103
+                    }
104
+                }
105
+            }
106
+            return modelList;
107
+        }
108
+
109
+        /// <summary>
110
+        /// 获得数据列表
111
+        /// </summary>
112
+        public DataSet GetAllList()
113
+        {
114
+            return GetList("");
115
+        }
116
+
117
+        /// <summary>
118
+        /// 分页获取数据列表
119
+        /// </summary>
120
+        public int GetRecordCount(string strWhere)
121
+        {
122
+            return dal.GetRecordCount(strWhere);
123
+        }
124
+        /// <summary>
125
+        /// 分页获取数据列表
126
+        /// </summary>
127
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
128
+        {
129
+            return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
130
+        }
131
+        /// <summary>
132
+        /// 分页获取数据列表
133
+        /// </summary>
134
+        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
135
+        //{
136
+        //return dal.GetList(PageSize,PageIndex,strWhere);
137
+        //}
138
+
139
+        #endregion  BasicMethod
140
+        #region  ExtensionMethod
141
+
142
+        #endregion  ExtensionMethod
143
+    }
144
+}
145
+

+ 3 - 0
CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj

@@ -105,8 +105,11 @@
105 105
     <Compile Include="T_Sys_IVRWords.cs" />
106 106
     <Compile Include="T_Sys_LoginLogs.cs" />
107 107
     <Compile Include="T_Sys_MobileData.cs" />
108
+    <Compile Include="T_Sys_ModuleInfo.cs" />
109
+    <Compile Include="T_Sys_ModuleInfoButton.cs" />
108 110
     <Compile Include="T_Sys_RoleFunction.cs" />
109 111
     <Compile Include="T_Sys_RoleInfo.cs" />
112
+    <Compile Include="T_Sys_RoleModule.cs" />
110 113
     <Compile Include="T_Sys_SeatGroup.cs" />
111 114
     <Compile Include="T_Sys_SeatPermissionConfig.cs" />
112 115
     <Compile Include="T_Sys_SystemConfig.cs" />

+ 443 - 0
CallCenterApi/CallCenterApi.DAL/T_Sys_ModuleInfo.cs

@@ -0,0 +1,443 @@
1
+using System;
2
+using System.Data;
3
+using System.Text;
4
+using System.Data.SqlClient;
5
+using CallCenterApi.DB;
6
+
7
+namespace CallCenterApi.DAL
8
+{
9
+    /// <summary>
10
+    /// 数据访问类:T_Sys_ModuleInfo
11
+    /// </summary>
12
+    public partial class T_Sys_ModuleInfo
13
+    {
14
+        public T_Sys_ModuleInfo()
15
+        { }
16
+        #region  BasicMethod
17
+        /// <summary>
18
+        /// 是否存在该记录
19
+        /// </summary>
20
+        public bool Exists(string code)
21
+        {
22
+            StringBuilder strSql = new StringBuilder();
23
+            strSql.Append("select count(1) from T_Sys_ModuleInfo");
24
+            strSql.Append(" where F_ModuleCode=@F_ModuleCode");
25
+            SqlParameter[] parameters = {
26
+                    new SqlParameter("@F_ModuleCode", SqlDbType.NVarChar,50)
27
+            };
28
+            parameters[0].Value = code;
29
+
30
+            return DbHelperSQL.Exists(strSql.ToString(), parameters);
31
+        }
32
+
33
+
34
+        /// <summary>
35
+        /// 增加一条数据
36
+        /// </summary>
37
+        public long Add(CallCenterApi.Model.T_Sys_ModuleInfo model)
38
+        {
39
+            StringBuilder strSql = new StringBuilder();
40
+            strSql.Append("insert into T_Sys_ModuleInfo(");
41
+            strSql.Append("F_ModuleCode,F_ModuleName,F_ParentID,F_IsMenu,F_Remark,F_Sort,F_StateFlag,F_Target,F_Button,F_OptUrl,F_ImgUrl,F_CreateUser,F_CreateTime,F_LastModifyUser,F_LastModifyTime,F_IsDelete,F_DeleteUser,F_DeleteTime)");
42
+            strSql.Append(" values (");
43
+            strSql.Append("@F_ModuleCode,@F_ModuleName,@F_ParentID,@F_IsMenu,@F_Remark,@F_Sort,@F_StateFlag,@F_Target,@F_Button,@F_OptUrl,@F_ImgUrl,@F_CreateUser,@F_CreateTime,@F_LastModifyUser,@F_LastModifyTime,@F_IsDelete,@F_DeleteUser,@F_DeleteTime)");
44
+            strSql.Append(";select @@IDENTITY");
45
+            SqlParameter[] parameters = {
46
+                    new SqlParameter("@F_ModuleCode", SqlDbType.NVarChar,50),
47
+                    new SqlParameter("@F_ModuleName", SqlDbType.NVarChar,50),
48
+                    new SqlParameter("@F_ParentID", SqlDbType.BigInt,8),
49
+                    new SqlParameter("@F_IsMenu", SqlDbType.Int,4),
50
+                    new SqlParameter("@F_Remark", SqlDbType.NVarChar,200),
51
+                    new SqlParameter("@F_Sort", SqlDbType.Int,4),
52
+                    new SqlParameter("@F_StateFlag", SqlDbType.Int,4),
53
+                    new SqlParameter("@F_Target", SqlDbType.VarChar,50),
54
+                    new SqlParameter("@F_Button", SqlDbType.VarChar,50),
55
+                    new SqlParameter("@F_OptUrl", SqlDbType.VarChar,200),
56
+                    new SqlParameter("@F_ImgUrl", SqlDbType.VarChar,200),
57
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
58
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
59
+                    new SqlParameter("@F_LastModifyUser", SqlDbType.VarChar,50),
60
+                    new SqlParameter("@F_LastModifyTime", SqlDbType.DateTime),
61
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
62
+                    new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
63
+                    new SqlParameter("@F_DeleteTime", SqlDbType.DateTime)};
64
+            parameters[0].Value = model.F_ModuleCode;
65
+            parameters[1].Value = model.F_ModuleName;
66
+            parameters[2].Value = model.F_ParentID;
67
+            parameters[3].Value = model.F_IsMenu;
68
+            parameters[4].Value = model.F_Remark;
69
+            parameters[5].Value = model.F_Sort;
70
+            parameters[6].Value = model.F_StateFlag;
71
+            parameters[7].Value = model.F_Target;
72
+            parameters[8].Value = model.F_Button;
73
+            parameters[9].Value = model.F_OptUrl;
74
+            parameters[10].Value = model.F_ImgUrl;
75
+            parameters[11].Value = model.F_CreateUser;
76
+            parameters[12].Value = model.F_CreateTime;
77
+            parameters[13].Value = model.F_LastModifyUser;
78
+            parameters[14].Value = model.F_LastModifyTime;
79
+            parameters[15].Value = model.F_IsDelete;
80
+            parameters[16].Value = model.F_DeleteUser;
81
+            parameters[17].Value = model.F_DeleteTime;
82
+
83
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
84
+            if (obj == null)
85
+            {
86
+                return 0;
87
+            }
88
+            else
89
+            {
90
+                return Convert.ToInt64(obj);
91
+            }
92
+        }
93
+        /// <summary>
94
+        /// 更新一条数据
95
+        /// </summary>
96
+        public bool Update(CallCenterApi.Model.T_Sys_ModuleInfo model)
97
+        {
98
+            StringBuilder strSql = new StringBuilder();
99
+            strSql.Append("update T_Sys_ModuleInfo set ");
100
+            strSql.Append("F_ModuleCode=@F_ModuleCode,");
101
+            strSql.Append("F_ModuleName=@F_ModuleName,");
102
+            strSql.Append("F_ParentID=@F_ParentID,");
103
+            strSql.Append("F_IsMenu=@F_IsMenu,");
104
+            strSql.Append("F_Remark=@F_Remark,");
105
+            strSql.Append("F_Sort=@F_Sort,");
106
+            strSql.Append("F_StateFlag=@F_StateFlag,");
107
+            strSql.Append("F_Target=@F_Target,");
108
+            strSql.Append("F_Button=@F_Button,");
109
+            strSql.Append("F_OptUrl=@F_OptUrl,");
110
+            strSql.Append("F_ImgUrl=@F_ImgUrl,");
111
+            strSql.Append("F_CreateUser=@F_CreateUser,");
112
+            strSql.Append("F_CreateTime=@F_CreateTime,");
113
+            strSql.Append("F_LastModifyUser=@F_LastModifyUser,");
114
+            strSql.Append("F_LastModifyTime=@F_LastModifyTime,");
115
+            strSql.Append("F_IsDelete=@F_IsDelete,");
116
+            strSql.Append("F_DeleteUser=@F_DeleteUser,");
117
+            strSql.Append("F_DeleteTime=@F_DeleteTime");
118
+            strSql.Append(" where F_Id=@F_Id");
119
+            SqlParameter[] parameters = {
120
+                    new SqlParameter("@F_ModuleCode", SqlDbType.NVarChar,50),
121
+                    new SqlParameter("@F_ModuleName", SqlDbType.NVarChar,50),
122
+                    new SqlParameter("@F_ParentID", SqlDbType.BigInt,8),
123
+                    new SqlParameter("@F_IsMenu", SqlDbType.Int,4),
124
+                    new SqlParameter("@F_Remark", SqlDbType.NVarChar,200),
125
+                    new SqlParameter("@F_Sort", SqlDbType.Int,4),
126
+                    new SqlParameter("@F_StateFlag", SqlDbType.Int,4),
127
+                    new SqlParameter("@F_Target", SqlDbType.VarChar,50),
128
+                    new SqlParameter("@F_Button", SqlDbType.VarChar,50),
129
+                    new SqlParameter("@F_OptUrl", SqlDbType.VarChar,200),
130
+                    new SqlParameter("@F_ImgUrl", SqlDbType.VarChar,200),
131
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
132
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
133
+                    new SqlParameter("@F_LastModifyUser", SqlDbType.VarChar,50),
134
+                    new SqlParameter("@F_LastModifyTime", SqlDbType.DateTime),
135
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
136
+                    new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
137
+                    new SqlParameter("@F_DeleteTime", SqlDbType.DateTime),
138
+                    new SqlParameter("@F_Id", SqlDbType.BigInt,8)};
139
+            parameters[0].Value = model.F_ModuleCode;
140
+            parameters[1].Value = model.F_ModuleName;
141
+            parameters[2].Value = model.F_ParentID;
142
+            parameters[3].Value = model.F_IsMenu;
143
+            parameters[4].Value = model.F_Remark;
144
+            parameters[5].Value = model.F_Sort;
145
+            parameters[6].Value = model.F_StateFlag;
146
+            parameters[7].Value = model.F_Target;
147
+            parameters[8].Value = model.F_Button;
148
+            parameters[9].Value = model.F_OptUrl;
149
+            parameters[10].Value = model.F_ImgUrl;
150
+            parameters[11].Value = model.F_CreateUser;
151
+            parameters[12].Value = model.F_CreateTime;
152
+            parameters[13].Value = model.F_LastModifyUser;
153
+            parameters[14].Value = model.F_LastModifyTime;
154
+            parameters[15].Value = model.F_IsDelete;
155
+            parameters[16].Value = model.F_DeleteUser;
156
+            parameters[17].Value = model.F_DeleteTime;
157
+            parameters[18].Value = model.F_Id;
158
+
159
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
160
+            if (rows > 0)
161
+            {
162
+                return true;
163
+            }
164
+            else
165
+            {
166
+                return false;
167
+            }
168
+        }
169
+
170
+        /// <summary>
171
+        /// 删除一条数据
172
+        /// </summary>
173
+        public bool Delete(long F_Id)
174
+        {
175
+
176
+            StringBuilder strSql = new StringBuilder();
177
+            strSql.Append("delete from T_Sys_ModuleInfo ");
178
+            strSql.Append(" where F_Id=@F_Id");
179
+            SqlParameter[] parameters = {
180
+                    new SqlParameter("@F_Id", SqlDbType.BigInt)
181
+            };
182
+            parameters[0].Value = F_Id;
183
+
184
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
185
+            if (rows > 0)
186
+            {
187
+                return true;
188
+            }
189
+            else
190
+            {
191
+                return false;
192
+            }
193
+        }
194
+        /// <summary>
195
+        /// 批量删除数据
196
+        /// </summary>
197
+        public bool DeleteList(string F_Idlist)
198
+        {
199
+            StringBuilder strSql = new StringBuilder();
200
+            strSql.Append("delete from T_Sys_ModuleInfo ");
201
+            strSql.Append(" where F_Id in (" + F_Idlist + ")  ");
202
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
203
+            if (rows > 0)
204
+            {
205
+                return true;
206
+            }
207
+            else
208
+            {
209
+                return false;
210
+            }
211
+        }
212
+
213
+
214
+        /// <summary>
215
+        /// 得到一个对象实体
216
+        /// </summary>
217
+        public CallCenterApi.Model.T_Sys_ModuleInfo GetModel(long F_Id)
218
+        {
219
+
220
+            StringBuilder strSql = new StringBuilder();
221
+            strSql.Append("select  top 1 F_Id,F_ModuleCode,F_ModuleName,F_ParentID,F_IsMenu,F_Remark,F_Sort,F_StateFlag,F_Target,F_Button,F_OptUrl,F_ImgUrl,F_CreateUser,F_CreateTime,F_LastModifyUser,F_LastModifyTime,F_IsDelete,F_DeleteUser,F_DeleteTime from T_Sys_ModuleInfo ");
222
+            strSql.Append(" where F_Id=@F_Id");
223
+            SqlParameter[] parameters = {
224
+                    new SqlParameter("@F_Id", SqlDbType.BigInt)
225
+            };
226
+            parameters[0].Value = F_Id;
227
+
228
+            CallCenterApi.Model.T_Sys_ModuleInfo model = new CallCenterApi.Model.T_Sys_ModuleInfo();
229
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
230
+            if (ds.Tables[0].Rows.Count > 0)
231
+            {
232
+                return DataRowToModel(ds.Tables[0].Rows[0]);
233
+            }
234
+            else
235
+            {
236
+                return null;
237
+            }
238
+        }
239
+
240
+
241
+        /// <summary>
242
+        /// 得到一个对象实体
243
+        /// </summary>
244
+        public CallCenterApi.Model.T_Sys_ModuleInfo DataRowToModel(DataRow row)
245
+        {
246
+            CallCenterApi.Model.T_Sys_ModuleInfo model = new CallCenterApi.Model.T_Sys_ModuleInfo();
247
+            if (row != null)
248
+            {
249
+                if (row["F_Id"] != null && row["F_Id"].ToString() != "")
250
+                {
251
+                    model.F_Id = long.Parse(row["F_Id"].ToString());
252
+                }
253
+                if (row["F_ModuleCode"] != null)
254
+                {
255
+                    model.F_ModuleCode = row["F_ModuleCode"].ToString();
256
+                }
257
+                if (row["F_ModuleName"] != null)
258
+                {
259
+                    model.F_ModuleName = row["F_ModuleName"].ToString();
260
+                }
261
+                if (row["F_ParentID"] != null && row["F_ParentID"].ToString() != "")
262
+                {
263
+                    model.F_ParentID = long.Parse(row["F_ParentID"].ToString());
264
+                }
265
+                if (row["F_IsMenu"] != null && row["F_IsMenu"].ToString() != "")
266
+                {
267
+                    model.F_IsMenu = int.Parse(row["F_IsMenu"].ToString());
268
+                }
269
+                if (row["F_Remark"] != null)
270
+                {
271
+                    model.F_Remark = row["F_Remark"].ToString();
272
+                }
273
+                if (row["F_Sort"] != null && row["F_Sort"].ToString() != "")
274
+                {
275
+                    model.F_Sort = int.Parse(row["F_Sort"].ToString());
276
+                }
277
+                if (row["F_StateFlag"] != null && row["F_StateFlag"].ToString() != "")
278
+                {
279
+                    model.F_StateFlag = int.Parse(row["F_StateFlag"].ToString());
280
+                }
281
+                if (row["F_Target"] != null)
282
+                {
283
+                    model.F_Target = row["F_Target"].ToString();
284
+                }
285
+                if (row["F_Button"] != null)
286
+                {
287
+                    model.F_Button = row["F_Button"].ToString();
288
+                }
289
+                if (row["F_OptUrl"] != null)
290
+                {
291
+                    model.F_OptUrl = row["F_OptUrl"].ToString();
292
+                }
293
+                if (row["F_ImgUrl"] != null)
294
+                {
295
+                    model.F_ImgUrl = row["F_ImgUrl"].ToString();
296
+                }
297
+                if (row["F_CreateUser"] != null)
298
+                {
299
+                    model.F_CreateUser = row["F_CreateUser"].ToString();
300
+                }
301
+                if (row["F_CreateTime"] != null && row["F_CreateTime"].ToString() != "")
302
+                {
303
+                    model.F_CreateTime = DateTime.Parse(row["F_CreateTime"].ToString());
304
+                }
305
+                if (row["F_LastModifyUser"] != null)
306
+                {
307
+                    model.F_LastModifyUser = row["F_LastModifyUser"].ToString();
308
+                }
309
+                if (row["F_LastModifyTime"] != null && row["F_LastModifyTime"].ToString() != "")
310
+                {
311
+                    model.F_LastModifyTime = DateTime.Parse(row["F_LastModifyTime"].ToString());
312
+                }
313
+                if (row["F_IsDelete"] != null && row["F_IsDelete"].ToString() != "")
314
+                {
315
+                    model.F_IsDelete = int.Parse(row["F_IsDelete"].ToString());
316
+                }
317
+                if (row["F_DeleteUser"] != null)
318
+                {
319
+                    model.F_DeleteUser = row["F_DeleteUser"].ToString();
320
+                }
321
+                if (row["F_DeleteTime"] != null && row["F_DeleteTime"].ToString() != "")
322
+                {
323
+                    model.F_DeleteTime = DateTime.Parse(row["F_DeleteTime"].ToString());
324
+                }
325
+            }
326
+            return model;
327
+        }
328
+
329
+        /// <summary>
330
+        /// 获得数据列表
331
+        /// </summary>
332
+        public DataSet GetList(string strWhere)
333
+        {
334
+            StringBuilder strSql = new StringBuilder();
335
+            strSql.Append("select F_Id,F_ModuleCode,F_ModuleName,F_ParentID,F_IsMenu,F_Remark,F_Sort,F_StateFlag,F_Target,F_Button,F_OptUrl,F_ImgUrl,F_CreateUser,F_CreateTime,F_LastModifyUser,F_LastModifyTime,F_IsDelete,F_DeleteUser,F_DeleteTime ");
336
+            strSql.Append(" FROM T_Sys_ModuleInfo ");
337
+            if (strWhere.Trim() != "")
338
+            {
339
+                strSql.Append(" where " + strWhere);
340
+            }
341
+            return DbHelperSQL.Query(strSql.ToString());
342
+        }
343
+
344
+        /// <summary>
345
+        /// 获得前几行数据
346
+        /// </summary>
347
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
348
+        {
349
+            StringBuilder strSql = new StringBuilder();
350
+            strSql.Append("select ");
351
+            if (Top > 0)
352
+            {
353
+                strSql.Append(" top " + Top.ToString());
354
+            }
355
+            strSql.Append(" F_Id,F_ModuleCode,F_ModuleName,F_ParentID,F_IsMenu,F_Remark,F_Sort,F_StateFlag,F_Target,F_Button,F_OptUrl,F_ImgUrl,F_CreateUser,F_CreateTime,F_LastModifyUser,F_LastModifyTime,F_IsDelete,F_DeleteUser,F_DeleteTime ");
356
+            strSql.Append(" FROM T_Sys_ModuleInfo ");
357
+            if (strWhere.Trim() != "")
358
+            {
359
+                strSql.Append(" where " + strWhere);
360
+            }
361
+            strSql.Append(" order by " + filedOrder);
362
+            return DbHelperSQL.Query(strSql.ToString());
363
+        }
364
+
365
+        /// <summary>
366
+        /// 获取记录总数
367
+        /// </summary>
368
+        public int GetRecordCount(string strWhere)
369
+        {
370
+            StringBuilder strSql = new StringBuilder();
371
+            strSql.Append("select count(1) FROM T_Sys_ModuleInfo ");
372
+            if (strWhere.Trim() != "")
373
+            {
374
+                strSql.Append(" where " + strWhere);
375
+            }
376
+            object obj = DbHelperSQL.GetSingle(strSql.ToString());
377
+            if (obj == null)
378
+            {
379
+                return 0;
380
+            }
381
+            else
382
+            {
383
+                return Convert.ToInt32(obj);
384
+            }
385
+        }
386
+        /// <summary>
387
+        /// 分页获取数据列表
388
+        /// </summary>
389
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
390
+        {
391
+            StringBuilder strSql = new StringBuilder();
392
+            strSql.Append("SELECT * FROM ( ");
393
+            strSql.Append(" SELECT ROW_NUMBER() OVER (");
394
+            if (!string.IsNullOrEmpty(orderby.Trim()))
395
+            {
396
+                strSql.Append("order by T." + orderby);
397
+            }
398
+            else
399
+            {
400
+                strSql.Append("order by T.F_Id desc");
401
+            }
402
+            strSql.Append(")AS Row, T.*  from T_Sys_ModuleInfo T ");
403
+            if (!string.IsNullOrEmpty(strWhere.Trim()))
404
+            {
405
+                strSql.Append(" WHERE " + strWhere);
406
+            }
407
+            strSql.Append(" ) TT");
408
+            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
409
+            return DbHelperSQL.Query(strSql.ToString());
410
+        }
411
+
412
+        /*
413
+		/// <summary>
414
+		/// 分页获取数据列表
415
+		/// </summary>
416
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
417
+		{
418
+			SqlParameter[] parameters = {
419
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
420
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
421
+					new SqlParameter("@PageSize", SqlDbType.Int),
422
+					new SqlParameter("@PageIndex", SqlDbType.Int),
423
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
424
+					new SqlParameter("@OrderType", SqlDbType.Bit),
425
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
426
+					};
427
+			parameters[0].Value = "T_Sys_ModuleInfo";
428
+			parameters[1].Value = "F_Id";
429
+			parameters[2].Value = PageSize;
430
+			parameters[3].Value = PageIndex;
431
+			parameters[4].Value = 0;
432
+			parameters[5].Value = 0;
433
+			parameters[6].Value = strWhere;	
434
+			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
435
+		}*/
436
+
437
+        #endregion  BasicMethod
438
+        #region  ExtensionMethod
439
+
440
+        #endregion  ExtensionMethod
441
+    }
442
+}
443
+

+ 461 - 0
CallCenterApi/CallCenterApi.DAL/T_Sys_ModuleInfoButton.cs

@@ -0,0 +1,461 @@
1
+using System;
2
+using System.Data;
3
+using System.Text;
4
+using System.Data.SqlClient;
5
+using CallCenterApi.DB;
6
+
7
+namespace CallCenterApi.DAL
8
+{
9
+    /// <summary>
10
+    /// 数据访问类:T_Sys_ModuleInfoButton
11
+    /// </summary>
12
+    public partial class T_Sys_ModuleInfoButton
13
+    {
14
+        public T_Sys_ModuleInfoButton()
15
+        { }
16
+        #region  BasicMethod
17
+        /// <summary>
18
+        /// 是否存在该记录
19
+        /// </summary>
20
+        public bool Exists(string code)
21
+        {
22
+            StringBuilder strSql = new StringBuilder();
23
+            strSql.Append("select count(1) from T_Sys_ModuleInfoButton");
24
+            strSql.Append(" where F_EnCode=@F_EnCode");
25
+            SqlParameter[] parameters = {
26
+                    new SqlParameter("@F_EnCode", SqlDbType.VarChar,50)
27
+            };
28
+            parameters[0].Value = code;
29
+
30
+            return DbHelperSQL.Exists(strSql.ToString(), parameters);
31
+        }
32
+
33
+
34
+        /// <summary>
35
+        /// 增加一条数据
36
+        /// </summary>
37
+        public long Add(CallCenterApi.Model.T_Sys_ModuleInfoButton model)
38
+        {
39
+            StringBuilder strSql = new StringBuilder();
40
+            strSql.Append("insert into T_Sys_ModuleInfoButton(");
41
+            strSql.Append("F_ModuleId,F_ParentId,F_Layers,F_EnCode,F_FullName,F_Icon,F_Location,F_JsEvent,F_UrlAddress,F_IsSplit,F_Sort,F_StateFlag,F_Remark,F_CreateUser,F_CreateTime,F_LastModifyUser,F_LastModifyTime,F_IsDelete,F_DeleteUser,F_DeleteTime)");
42
+            strSql.Append(" values (");
43
+            strSql.Append("@F_ModuleId,@F_ParentId,@F_Layers,@F_EnCode,@F_FullName,@F_Icon,@F_Location,@F_JsEvent,@F_UrlAddress,@F_IsSplit,@F_Sort,@F_StateFlag,@F_Remark,@F_CreateUser,@F_CreateTime,@F_LastModifyUser,@F_LastModifyTime,@F_IsDelete,@F_DeleteUser,@F_DeleteTime)");
44
+            strSql.Append(";select @@IDENTITY");
45
+            SqlParameter[] parameters = {
46
+                    new SqlParameter("@F_ModuleId", SqlDbType.BigInt,8),
47
+                    new SqlParameter("@F_ParentId", SqlDbType.BigInt,8),
48
+                    new SqlParameter("@F_Layers", SqlDbType.Int,4),
49
+                    new SqlParameter("@F_EnCode", SqlDbType.VarChar,50),
50
+                    new SqlParameter("@F_FullName", SqlDbType.VarChar,50),
51
+                    new SqlParameter("@F_Icon", SqlDbType.VarChar,50),
52
+                    new SqlParameter("@F_Location", SqlDbType.Int,4),
53
+                    new SqlParameter("@F_JsEvent", SqlDbType.VarChar,50),
54
+                    new SqlParameter("@F_UrlAddress", SqlDbType.VarChar,500),
55
+                    new SqlParameter("@F_IsSplit", SqlDbType.Int,4),
56
+                    new SqlParameter("@F_Sort", SqlDbType.Int,4),
57
+                    new SqlParameter("@F_StateFlag", SqlDbType.Int,4),
58
+                    new SqlParameter("@F_Remark", SqlDbType.VarChar,50),
59
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
60
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
61
+                    new SqlParameter("@F_LastModifyUser", SqlDbType.VarChar,50),
62
+                    new SqlParameter("@F_LastModifyTime", SqlDbType.DateTime),
63
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
64
+                    new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
65
+                    new SqlParameter("@F_DeleteTime", SqlDbType.DateTime)};
66
+            parameters[0].Value = model.F_ModuleId;
67
+            parameters[1].Value = model.F_ParentId;
68
+            parameters[2].Value = model.F_Layers;
69
+            parameters[3].Value = model.F_EnCode;
70
+            parameters[4].Value = model.F_FullName;
71
+            parameters[5].Value = model.F_Icon;
72
+            parameters[6].Value = model.F_Location;
73
+            parameters[7].Value = model.F_JsEvent;
74
+            parameters[8].Value = model.F_UrlAddress;
75
+            parameters[9].Value = model.F_IsSplit;
76
+            parameters[10].Value = model.F_Sort;
77
+            parameters[11].Value = model.F_StateFlag;
78
+            parameters[12].Value = model.F_Remark;
79
+            parameters[13].Value = model.F_CreateUser;
80
+            parameters[14].Value = model.F_CreateTime;
81
+            parameters[15].Value = model.F_LastModifyUser;
82
+            parameters[16].Value = model.F_LastModifyTime;
83
+            parameters[17].Value = model.F_IsDelete;
84
+            parameters[18].Value = model.F_DeleteUser;
85
+            parameters[19].Value = model.F_DeleteTime;
86
+
87
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
88
+            if (obj == null)
89
+            {
90
+                return 0;
91
+            }
92
+            else
93
+            {
94
+                return Convert.ToInt64(obj);
95
+            }
96
+        }
97
+        /// <summary>
98
+        /// 更新一条数据
99
+        /// </summary>
100
+        public bool Update(CallCenterApi.Model.T_Sys_ModuleInfoButton model)
101
+        {
102
+            StringBuilder strSql = new StringBuilder();
103
+            strSql.Append("update T_Sys_ModuleInfoButton set ");
104
+            strSql.Append("F_ModuleId=@F_ModuleId,");
105
+            strSql.Append("F_ParentId=@F_ParentId,");
106
+            strSql.Append("F_Layers=@F_Layers,");
107
+            strSql.Append("F_EnCode=@F_EnCode,");
108
+            strSql.Append("F_FullName=@F_FullName,");
109
+            strSql.Append("F_Icon=@F_Icon,");
110
+            strSql.Append("F_Location=@F_Location,");
111
+            strSql.Append("F_JsEvent=@F_JsEvent,");
112
+            strSql.Append("F_UrlAddress=@F_UrlAddress,");
113
+            strSql.Append("F_IsSplit=@F_IsSplit,");
114
+            strSql.Append("F_Sort=@F_Sort,");
115
+            strSql.Append("F_StateFlag=@F_StateFlag,");
116
+            strSql.Append("F_Remark=@F_Remark,");
117
+            strSql.Append("F_CreateUser=@F_CreateUser,");
118
+            strSql.Append("F_CreateTime=@F_CreateTime,");
119
+            strSql.Append("F_LastModifyUser=@F_LastModifyUser,");
120
+            strSql.Append("F_LastModifyTime=@F_LastModifyTime,");
121
+            strSql.Append("F_IsDelete=@F_IsDelete,");
122
+            strSql.Append("F_DeleteUser=@F_DeleteUser,");
123
+            strSql.Append("F_DeleteTime=@F_DeleteTime");
124
+            strSql.Append(" where F_Id=@F_Id");
125
+            SqlParameter[] parameters = {
126
+                    new SqlParameter("@F_ModuleId", SqlDbType.BigInt,8),
127
+                    new SqlParameter("@F_ParentId", SqlDbType.BigInt,8),
128
+                    new SqlParameter("@F_Layers", SqlDbType.Int,4),
129
+                    new SqlParameter("@F_EnCode", SqlDbType.VarChar,50),
130
+                    new SqlParameter("@F_FullName", SqlDbType.VarChar,50),
131
+                    new SqlParameter("@F_Icon", SqlDbType.VarChar,50),
132
+                    new SqlParameter("@F_Location", SqlDbType.Int,4),
133
+                    new SqlParameter("@F_JsEvent", SqlDbType.VarChar,50),
134
+                    new SqlParameter("@F_UrlAddress", SqlDbType.VarChar,500),
135
+                    new SqlParameter("@F_IsSplit", SqlDbType.Int,4),
136
+                    new SqlParameter("@F_Sort", SqlDbType.Int,4),
137
+                    new SqlParameter("@F_StateFlag", SqlDbType.Int,4),
138
+                    new SqlParameter("@F_Remark", SqlDbType.VarChar,50),
139
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
140
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
141
+                    new SqlParameter("@F_LastModifyUser", SqlDbType.VarChar,50),
142
+                    new SqlParameter("@F_LastModifyTime", SqlDbType.DateTime),
143
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
144
+                    new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
145
+                    new SqlParameter("@F_DeleteTime", SqlDbType.DateTime),
146
+                    new SqlParameter("@F_Id", SqlDbType.BigInt,8)};
147
+            parameters[0].Value = model.F_ModuleId;
148
+            parameters[1].Value = model.F_ParentId;
149
+            parameters[2].Value = model.F_Layers;
150
+            parameters[3].Value = model.F_EnCode;
151
+            parameters[4].Value = model.F_FullName;
152
+            parameters[5].Value = model.F_Icon;
153
+            parameters[6].Value = model.F_Location;
154
+            parameters[7].Value = model.F_JsEvent;
155
+            parameters[8].Value = model.F_UrlAddress;
156
+            parameters[9].Value = model.F_IsSplit;
157
+            parameters[10].Value = model.F_Sort;
158
+            parameters[11].Value = model.F_StateFlag;
159
+            parameters[12].Value = model.F_Remark;
160
+            parameters[13].Value = model.F_CreateUser;
161
+            parameters[14].Value = model.F_CreateTime;
162
+            parameters[15].Value = model.F_LastModifyUser;
163
+            parameters[16].Value = model.F_LastModifyTime;
164
+            parameters[17].Value = model.F_IsDelete;
165
+            parameters[18].Value = model.F_DeleteUser;
166
+            parameters[19].Value = model.F_DeleteTime;
167
+            parameters[20].Value = model.F_Id;
168
+
169
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
170
+            if (rows > 0)
171
+            {
172
+                return true;
173
+            }
174
+            else
175
+            {
176
+                return false;
177
+            }
178
+        }
179
+
180
+        /// <summary>
181
+        /// 删除一条数据
182
+        /// </summary>
183
+        public bool Delete(long F_Id)
184
+        {
185
+
186
+            StringBuilder strSql = new StringBuilder();
187
+            strSql.Append("delete from T_Sys_ModuleInfoButton ");
188
+            strSql.Append(" where F_Id=@F_Id");
189
+            SqlParameter[] parameters = {
190
+                    new SqlParameter("@F_Id", SqlDbType.BigInt)
191
+            };
192
+            parameters[0].Value = F_Id;
193
+
194
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
195
+            if (rows > 0)
196
+            {
197
+                return true;
198
+            }
199
+            else
200
+            {
201
+                return false;
202
+            }
203
+        }
204
+        /// <summary>
205
+        /// 批量删除数据
206
+        /// </summary>
207
+        public bool DeleteList(string F_Idlist)
208
+        {
209
+            StringBuilder strSql = new StringBuilder();
210
+            strSql.Append("delete from T_Sys_ModuleInfoButton ");
211
+            strSql.Append(" where F_Id in (" + F_Idlist + ")  ");
212
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
213
+            if (rows > 0)
214
+            {
215
+                return true;
216
+            }
217
+            else
218
+            {
219
+                return false;
220
+            }
221
+        }
222
+
223
+
224
+        /// <summary>
225
+        /// 得到一个对象实体
226
+        /// </summary>
227
+        public CallCenterApi.Model.T_Sys_ModuleInfoButton GetModel(long F_Id)
228
+        {
229
+
230
+            StringBuilder strSql = new StringBuilder();
231
+            strSql.Append("select  top 1 F_Id,F_ModuleId,F_ParentId,F_Layers,F_EnCode,F_FullName,F_Icon,F_Location,F_JsEvent,F_UrlAddress,F_IsSplit,F_Sort,F_StateFlag,F_Remark,F_CreateUser,F_CreateTime,F_LastModifyUser,F_LastModifyTime,F_IsDelete,F_DeleteUser,F_DeleteTime from T_Sys_ModuleInfoButton ");
232
+            strSql.Append(" where F_Id=@F_Id");
233
+            SqlParameter[] parameters = {
234
+                    new SqlParameter("@F_Id", SqlDbType.BigInt)
235
+            };
236
+            parameters[0].Value = F_Id;
237
+
238
+            CallCenterApi.Model.T_Sys_ModuleInfoButton model = new CallCenterApi.Model.T_Sys_ModuleInfoButton();
239
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
240
+            if (ds.Tables[0].Rows.Count > 0)
241
+            {
242
+                return DataRowToModel(ds.Tables[0].Rows[0]);
243
+            }
244
+            else
245
+            {
246
+                return null;
247
+            }
248
+        }
249
+
250
+
251
+        /// <summary>
252
+        /// 得到一个对象实体
253
+        /// </summary>
254
+        public CallCenterApi.Model.T_Sys_ModuleInfoButton DataRowToModel(DataRow row)
255
+        {
256
+            CallCenterApi.Model.T_Sys_ModuleInfoButton model = new CallCenterApi.Model.T_Sys_ModuleInfoButton();
257
+            if (row != null)
258
+            {
259
+                if (row["F_Id"] != null && row["F_Id"].ToString() != "")
260
+                {
261
+                    model.F_Id = long.Parse(row["F_Id"].ToString());
262
+                }
263
+                if (row["F_ModuleId"] != null && row["F_ModuleId"].ToString() != "")
264
+                {
265
+                    model.F_ModuleId = long.Parse(row["F_ModuleId"].ToString());
266
+                }
267
+                if (row["F_ParentId"] != null && row["F_ParentId"].ToString() != "")
268
+                {
269
+                    model.F_ParentId = long.Parse(row["F_ParentId"].ToString());
270
+                }
271
+                if (row["F_Layers"] != null && row["F_Layers"].ToString() != "")
272
+                {
273
+                    model.F_Layers = int.Parse(row["F_Layers"].ToString());
274
+                }
275
+                if (row["F_EnCode"] != null)
276
+                {
277
+                    model.F_EnCode = row["F_EnCode"].ToString();
278
+                }
279
+                if (row["F_FullName"] != null)
280
+                {
281
+                    model.F_FullName = row["F_FullName"].ToString();
282
+                }
283
+                if (row["F_Icon"] != null)
284
+                {
285
+                    model.F_Icon = row["F_Icon"].ToString();
286
+                }
287
+                if (row["F_Location"] != null && row["F_Location"].ToString() != "")
288
+                {
289
+                    model.F_Location = int.Parse(row["F_Location"].ToString());
290
+                }
291
+                if (row["F_JsEvent"] != null)
292
+                {
293
+                    model.F_JsEvent = row["F_JsEvent"].ToString();
294
+                }
295
+                if (row["F_UrlAddress"] != null)
296
+                {
297
+                    model.F_UrlAddress = row["F_UrlAddress"].ToString();
298
+                }
299
+                if (row["F_IsSplit"] != null && row["F_IsSplit"].ToString() != "")
300
+                {
301
+                    model.F_IsSplit = int.Parse(row["F_IsSplit"].ToString());
302
+                }
303
+                if (row["F_Sort"] != null && row["F_Sort"].ToString() != "")
304
+                {
305
+                    model.F_Sort = int.Parse(row["F_Sort"].ToString());
306
+                }
307
+                if (row["F_StateFlag"] != null && row["F_StateFlag"].ToString() != "")
308
+                {
309
+                    model.F_StateFlag = int.Parse(row["F_StateFlag"].ToString());
310
+                }
311
+                if (row["F_Remark"] != null)
312
+                {
313
+                    model.F_Remark = row["F_Remark"].ToString();
314
+                }
315
+                if (row["F_CreateUser"] != null)
316
+                {
317
+                    model.F_CreateUser = row["F_CreateUser"].ToString();
318
+                }
319
+                if (row["F_CreateTime"] != null && row["F_CreateTime"].ToString() != "")
320
+                {
321
+                    model.F_CreateTime = DateTime.Parse(row["F_CreateTime"].ToString());
322
+                }
323
+                if (row["F_LastModifyUser"] != null)
324
+                {
325
+                    model.F_LastModifyUser = row["F_LastModifyUser"].ToString();
326
+                }
327
+                if (row["F_LastModifyTime"] != null && row["F_LastModifyTime"].ToString() != "")
328
+                {
329
+                    model.F_LastModifyTime = DateTime.Parse(row["F_LastModifyTime"].ToString());
330
+                }
331
+                if (row["F_IsDelete"] != null && row["F_IsDelete"].ToString() != "")
332
+                {
333
+                    model.F_IsDelete = int.Parse(row["F_IsDelete"].ToString());
334
+                }
335
+                if (row["F_DeleteUser"] != null)
336
+                {
337
+                    model.F_DeleteUser = row["F_DeleteUser"].ToString();
338
+                }
339
+                if (row["F_DeleteTime"] != null && row["F_DeleteTime"].ToString() != "")
340
+                {
341
+                    model.F_DeleteTime = DateTime.Parse(row["F_DeleteTime"].ToString());
342
+                }
343
+            }
344
+            return model;
345
+        }
346
+
347
+        /// <summary>
348
+        /// 获得数据列表
349
+        /// </summary>
350
+        public DataSet GetList(string strWhere)
351
+        {
352
+            StringBuilder strSql = new StringBuilder();
353
+            strSql.Append("select F_Id,F_ModuleId,F_ParentId,F_Layers,F_EnCode,F_FullName,F_Icon,F_Location,F_JsEvent,F_UrlAddress,F_IsSplit,F_Sort,F_StateFlag,F_Remark,F_CreateUser,F_CreateTime,F_LastModifyUser,F_LastModifyTime,F_IsDelete,F_DeleteUser,F_DeleteTime ");
354
+            strSql.Append(" FROM T_Sys_ModuleInfoButton ");
355
+            if (strWhere.Trim() != "")
356
+            {
357
+                strSql.Append(" where " + strWhere);
358
+            }
359
+            return DbHelperSQL.Query(strSql.ToString());
360
+        }
361
+
362
+        /// <summary>
363
+        /// 获得前几行数据
364
+        /// </summary>
365
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
366
+        {
367
+            StringBuilder strSql = new StringBuilder();
368
+            strSql.Append("select ");
369
+            if (Top > 0)
370
+            {
371
+                strSql.Append(" top " + Top.ToString());
372
+            }
373
+            strSql.Append(" F_Id,F_ModuleId,F_ParentId,F_Layers,F_EnCode,F_FullName,F_Icon,F_Location,F_JsEvent,F_UrlAddress,F_IsSplit,F_Sort,F_StateFlag,F_Remark,F_CreateUser,F_CreateTime,F_LastModifyUser,F_LastModifyTime,F_IsDelete,F_DeleteUser,F_DeleteTime ");
374
+            strSql.Append(" FROM T_Sys_ModuleInfoButton ");
375
+            if (strWhere.Trim() != "")
376
+            {
377
+                strSql.Append(" where " + strWhere);
378
+            }
379
+            strSql.Append(" order by " + filedOrder);
380
+            return DbHelperSQL.Query(strSql.ToString());
381
+        }
382
+
383
+        /// <summary>
384
+        /// 获取记录总数
385
+        /// </summary>
386
+        public int GetRecordCount(string strWhere)
387
+        {
388
+            StringBuilder strSql = new StringBuilder();
389
+            strSql.Append("select count(1) FROM T_Sys_ModuleInfoButton ");
390
+            if (strWhere.Trim() != "")
391
+            {
392
+                strSql.Append(" where " + strWhere);
393
+            }
394
+            object obj = DbHelperSQL.GetSingle(strSql.ToString());
395
+            if (obj == null)
396
+            {
397
+                return 0;
398
+            }
399
+            else
400
+            {
401
+                return Convert.ToInt32(obj);
402
+            }
403
+        }
404
+        /// <summary>
405
+        /// 分页获取数据列表
406
+        /// </summary>
407
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
408
+        {
409
+            StringBuilder strSql = new StringBuilder();
410
+            strSql.Append("SELECT * FROM ( ");
411
+            strSql.Append(" SELECT ROW_NUMBER() OVER (");
412
+            if (!string.IsNullOrEmpty(orderby.Trim()))
413
+            {
414
+                strSql.Append("order by T." + orderby);
415
+            }
416
+            else
417
+            {
418
+                strSql.Append("order by T.F_Id desc");
419
+            }
420
+            strSql.Append(")AS Row, T.*  from T_Sys_ModuleInfoButton T ");
421
+            if (!string.IsNullOrEmpty(strWhere.Trim()))
422
+            {
423
+                strSql.Append(" WHERE " + strWhere);
424
+            }
425
+            strSql.Append(" ) TT");
426
+            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
427
+            return DbHelperSQL.Query(strSql.ToString());
428
+        }
429
+
430
+        /*
431
+		/// <summary>
432
+		/// 分页获取数据列表
433
+		/// </summary>
434
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
435
+		{
436
+			SqlParameter[] parameters = {
437
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
438
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
439
+					new SqlParameter("@PageSize", SqlDbType.Int),
440
+					new SqlParameter("@PageIndex", SqlDbType.Int),
441
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
442
+					new SqlParameter("@OrderType", SqlDbType.Bit),
443
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
444
+					};
445
+			parameters[0].Value = "T_Sys_ModuleInfoButton";
446
+			parameters[1].Value = "F_Id";
447
+			parameters[2].Value = PageSize;
448
+			parameters[3].Value = PageIndex;
449
+			parameters[4].Value = 0;
450
+			parameters[5].Value = 0;
451
+			parameters[6].Value = strWhere;	
452
+			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
453
+		}*/
454
+
455
+        #endregion  BasicMethod
456
+        #region  ExtensionMethod
457
+
458
+        #endregion  ExtensionMethod
459
+    }
460
+}
461
+

+ 389 - 0
CallCenterApi/CallCenterApi.DAL/T_Sys_RoleModule.cs

@@ -0,0 +1,389 @@
1
+using System;
2
+using System.Data;
3
+using System.Text;
4
+using System.Data.SqlClient;
5
+using CallCenterApi.DB;
6
+
7
+namespace CallCenterApi.DAL
8
+{
9
+    /// <summary>
10
+    /// 数据访问类:T_Sys_RoleModule
11
+    /// </summary>
12
+    public partial class T_Sys_RoleModule
13
+    {
14
+        public T_Sys_RoleModule()
15
+        { }
16
+        #region  BasicMethod
17
+        /// <summary>
18
+        /// 是否存在该记录
19
+        /// </summary>
20
+        public bool Exists(long F_Id)
21
+        {
22
+            StringBuilder strSql = new StringBuilder();
23
+            strSql.Append("select count(1) from T_Sys_RoleModule");
24
+            strSql.Append(" where F_Id=@F_Id");
25
+            SqlParameter[] parameters = {
26
+                    new SqlParameter("@F_Id", SqlDbType.BigInt)
27
+            };
28
+            parameters[0].Value = F_Id;
29
+
30
+            return DbHelperSQL.Exists(strSql.ToString(), parameters);
31
+        }
32
+
33
+
34
+        /// <summary>
35
+        /// 增加一条数据
36
+        /// </summary>
37
+        public long Add(CallCenterApi.Model.T_Sys_RoleModule model)
38
+        {
39
+            StringBuilder strSql = new StringBuilder();
40
+            strSql.Append("insert into T_Sys_RoleModule(");
41
+            strSql.Append("F_RoleId,F_RoleType,F_ModuleId,F_ModuleType,F_State,F_CreateUser,F_CreateTime,F_UpdateUser,F_UpdateTime,F_IsDelete,F_DeleteUser,F_DeleteTime)");
42
+            strSql.Append(" values (");
43
+            strSql.Append("@F_RoleId,@F_RoleType,@F_ModuleId,@F_ModuleType,@F_State,@F_CreateUser,@F_CreateTime,@F_UpdateUser,@F_UpdateTime,@F_IsDelete,@F_DeleteUser,@F_DeleteTime)");
44
+            strSql.Append(";select @@IDENTITY");
45
+            SqlParameter[] parameters = {
46
+                    new SqlParameter("@F_RoleId", SqlDbType.BigInt,8),
47
+                    new SqlParameter("@F_RoleType", SqlDbType.Int,4),
48
+                    new SqlParameter("@F_ModuleId", SqlDbType.BigInt,8),
49
+                    new SqlParameter("@F_ModuleType", SqlDbType.Int,4),
50
+                    new SqlParameter("@F_State", SqlDbType.Int,4),
51
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
52
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
53
+                    new SqlParameter("@F_UpdateUser", SqlDbType.VarChar,50),
54
+                    new SqlParameter("@F_UpdateTime", SqlDbType.DateTime),
55
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
56
+                    new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
57
+                    new SqlParameter("@F_DeleteTime", SqlDbType.DateTime)};
58
+            parameters[0].Value = model.F_RoleId;
59
+            parameters[1].Value = model.F_RoleType;
60
+            parameters[2].Value = model.F_ModuleId;
61
+            parameters[3].Value = model.F_ModuleType;
62
+            parameters[4].Value = model.F_State;
63
+            parameters[5].Value = model.F_CreateUser;
64
+            parameters[6].Value = model.F_CreateTime;
65
+            parameters[7].Value = model.F_UpdateUser;
66
+            parameters[8].Value = model.F_UpdateTime;
67
+            parameters[9].Value = model.F_IsDelete;
68
+            parameters[10].Value = model.F_DeleteUser;
69
+            parameters[11].Value = model.F_DeleteTime;
70
+
71
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
72
+            if (obj == null)
73
+            {
74
+                return 0;
75
+            }
76
+            else
77
+            {
78
+                return Convert.ToInt64(obj);
79
+            }
80
+        }
81
+        /// <summary>
82
+        /// 更新一条数据
83
+        /// </summary>
84
+        public bool Update(CallCenterApi.Model.T_Sys_RoleModule model)
85
+        {
86
+            StringBuilder strSql = new StringBuilder();
87
+            strSql.Append("update T_Sys_RoleModule set ");
88
+            strSql.Append("F_RoleId=@F_RoleId,");
89
+            strSql.Append("F_RoleType=@F_RoleType,");
90
+            strSql.Append("F_ModuleId=@F_ModuleId,");
91
+            strSql.Append("F_ModuleType=@F_ModuleType,");
92
+            strSql.Append("F_State=@F_State,");
93
+            strSql.Append("F_CreateUser=@F_CreateUser,");
94
+            strSql.Append("F_CreateTime=@F_CreateTime,");
95
+            strSql.Append("F_UpdateUser=@F_UpdateUser,");
96
+            strSql.Append("F_UpdateTime=@F_UpdateTime,");
97
+            strSql.Append("F_IsDelete=@F_IsDelete,");
98
+            strSql.Append("F_DeleteUser=@F_DeleteUser,");
99
+            strSql.Append("F_DeleteTime=@F_DeleteTime");
100
+            strSql.Append(" where F_Id=@F_Id");
101
+            SqlParameter[] parameters = {
102
+                    new SqlParameter("@F_RoleId", SqlDbType.BigInt,8),
103
+                    new SqlParameter("@F_RoleType", SqlDbType.Int,4),
104
+                    new SqlParameter("@F_ModuleId", SqlDbType.BigInt,8),
105
+                    new SqlParameter("@F_ModuleType", SqlDbType.Int,4),
106
+                    new SqlParameter("@F_State", SqlDbType.Int,4),
107
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
108
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
109
+                    new SqlParameter("@F_UpdateUser", SqlDbType.VarChar,50),
110
+                    new SqlParameter("@F_UpdateTime", SqlDbType.DateTime),
111
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
112
+                    new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
113
+                    new SqlParameter("@F_DeleteTime", SqlDbType.DateTime),
114
+                    new SqlParameter("@F_Id", SqlDbType.BigInt,8)};
115
+            parameters[0].Value = model.F_RoleId;
116
+            parameters[1].Value = model.F_RoleType;
117
+            parameters[2].Value = model.F_ModuleId;
118
+            parameters[3].Value = model.F_ModuleType;
119
+            parameters[4].Value = model.F_State;
120
+            parameters[5].Value = model.F_CreateUser;
121
+            parameters[6].Value = model.F_CreateTime;
122
+            parameters[7].Value = model.F_UpdateUser;
123
+            parameters[8].Value = model.F_UpdateTime;
124
+            parameters[9].Value = model.F_IsDelete;
125
+            parameters[10].Value = model.F_DeleteUser;
126
+            parameters[11].Value = model.F_DeleteTime;
127
+            parameters[12].Value = model.F_Id;
128
+
129
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
130
+            if (rows > 0)
131
+            {
132
+                return true;
133
+            }
134
+            else
135
+            {
136
+                return false;
137
+            }
138
+        }
139
+
140
+        /// <summary>
141
+        /// 删除一条数据
142
+        /// </summary>
143
+        public bool Delete(long F_Id)
144
+        {
145
+
146
+            StringBuilder strSql = new StringBuilder();
147
+            strSql.Append("delete from T_Sys_RoleModule ");
148
+            strSql.Append(" where F_Id=@F_Id");
149
+            SqlParameter[] parameters = {
150
+                    new SqlParameter("@F_Id", SqlDbType.BigInt)
151
+            };
152
+            parameters[0].Value = F_Id;
153
+
154
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
155
+            if (rows > 0)
156
+            {
157
+                return true;
158
+            }
159
+            else
160
+            {
161
+                return false;
162
+            }
163
+        }
164
+        /// <summary>
165
+        /// 批量删除数据
166
+        /// </summary>
167
+        public bool DeleteList(string F_Idlist)
168
+        {
169
+            StringBuilder strSql = new StringBuilder();
170
+            strSql.Append("delete from T_Sys_RoleModule ");
171
+            strSql.Append(" where F_Id in (" + F_Idlist + ")  ");
172
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
173
+            if (rows > 0)
174
+            {
175
+                return true;
176
+            }
177
+            else
178
+            {
179
+                return false;
180
+            }
181
+        }
182
+
183
+
184
+        /// <summary>
185
+        /// 得到一个对象实体
186
+        /// </summary>
187
+        public CallCenterApi.Model.T_Sys_RoleModule GetModel(long F_Id)
188
+        {
189
+
190
+            StringBuilder strSql = new StringBuilder();
191
+            strSql.Append("select  top 1 F_Id,F_RoleId,F_RoleType,F_ModuleId,F_ModuleType,F_State,F_CreateUser,F_CreateTime,F_UpdateUser,F_UpdateTime,F_IsDelete,F_DeleteUser,F_DeleteTime from T_Sys_RoleModule ");
192
+            strSql.Append(" where F_Id=@F_Id");
193
+            SqlParameter[] parameters = {
194
+                    new SqlParameter("@F_Id", SqlDbType.BigInt)
195
+            };
196
+            parameters[0].Value = F_Id;
197
+
198
+            CallCenterApi.Model.T_Sys_RoleModule model = new CallCenterApi.Model.T_Sys_RoleModule();
199
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
200
+            if (ds.Tables[0].Rows.Count > 0)
201
+            {
202
+                return DataRowToModel(ds.Tables[0].Rows[0]);
203
+            }
204
+            else
205
+            {
206
+                return null;
207
+            }
208
+        }
209
+
210
+
211
+        /// <summary>
212
+        /// 得到一个对象实体
213
+        /// </summary>
214
+        public CallCenterApi.Model.T_Sys_RoleModule DataRowToModel(DataRow row)
215
+        {
216
+            CallCenterApi.Model.T_Sys_RoleModule model = new CallCenterApi.Model.T_Sys_RoleModule();
217
+            if (row != null)
218
+            {
219
+                if (row["F_Id"] != null && row["F_Id"].ToString() != "")
220
+                {
221
+                    model.F_Id = long.Parse(row["F_Id"].ToString());
222
+                }
223
+                if (row["F_RoleId"] != null && row["F_RoleId"].ToString() != "")
224
+                {
225
+                    model.F_RoleId = long.Parse(row["F_RoleId"].ToString());
226
+                }
227
+                if (row["F_RoleType"] != null && row["F_RoleType"].ToString() != "")
228
+                {
229
+                    model.F_RoleType = int.Parse(row["F_RoleType"].ToString());
230
+                }
231
+                if (row["F_ModuleId"] != null && row["F_ModuleId"].ToString() != "")
232
+                {
233
+                    model.F_ModuleId = long.Parse(row["F_ModuleId"].ToString());
234
+                }
235
+                if (row["F_ModuleType"] != null && row["F_ModuleType"].ToString() != "")
236
+                {
237
+                    model.F_ModuleType = int.Parse(row["F_ModuleType"].ToString());
238
+                }
239
+                if (row["F_State"] != null && row["F_State"].ToString() != "")
240
+                {
241
+                    model.F_State = int.Parse(row["F_State"].ToString());
242
+                }
243
+                if (row["F_CreateUser"] != null)
244
+                {
245
+                    model.F_CreateUser = row["F_CreateUser"].ToString();
246
+                }
247
+                if (row["F_CreateTime"] != null && row["F_CreateTime"].ToString() != "")
248
+                {
249
+                    model.F_CreateTime = DateTime.Parse(row["F_CreateTime"].ToString());
250
+                }
251
+                if (row["F_UpdateUser"] != null)
252
+                {
253
+                    model.F_UpdateUser = row["F_UpdateUser"].ToString();
254
+                }
255
+                if (row["F_UpdateTime"] != null && row["F_UpdateTime"].ToString() != "")
256
+                {
257
+                    model.F_UpdateTime = DateTime.Parse(row["F_UpdateTime"].ToString());
258
+                }
259
+                if (row["F_IsDelete"] != null && row["F_IsDelete"].ToString() != "")
260
+                {
261
+                    model.F_IsDelete = int.Parse(row["F_IsDelete"].ToString());
262
+                }
263
+                if (row["F_DeleteUser"] != null)
264
+                {
265
+                    model.F_DeleteUser = row["F_DeleteUser"].ToString();
266
+                }
267
+                if (row["F_DeleteTime"] != null && row["F_DeleteTime"].ToString() != "")
268
+                {
269
+                    model.F_DeleteTime = DateTime.Parse(row["F_DeleteTime"].ToString());
270
+                }
271
+            }
272
+            return model;
273
+        }
274
+
275
+        /// <summary>
276
+        /// 获得数据列表
277
+        /// </summary>
278
+        public DataSet GetList(string strWhere)
279
+        {
280
+            StringBuilder strSql = new StringBuilder();
281
+            strSql.Append("select F_Id,F_RoleId,F_RoleType,F_ModuleId,F_ModuleType,F_State,F_CreateUser,F_CreateTime,F_UpdateUser,F_UpdateTime,F_IsDelete,F_DeleteUser,F_DeleteTime ");
282
+            strSql.Append(" FROM T_Sys_RoleModule ");
283
+            if (strWhere.Trim() != "")
284
+            {
285
+                strSql.Append(" where " + strWhere);
286
+            }
287
+            return DbHelperSQL.Query(strSql.ToString());
288
+        }
289
+
290
+        /// <summary>
291
+        /// 获得前几行数据
292
+        /// </summary>
293
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
294
+        {
295
+            StringBuilder strSql = new StringBuilder();
296
+            strSql.Append("select ");
297
+            if (Top > 0)
298
+            {
299
+                strSql.Append(" top " + Top.ToString());
300
+            }
301
+            strSql.Append(" F_Id,F_RoleId,F_RoleType,F_ModuleId,F_ModuleType,F_State,F_CreateUser,F_CreateTime,F_UpdateUser,F_UpdateTime,F_IsDelete,F_DeleteUser,F_DeleteTime ");
302
+            strSql.Append(" FROM T_Sys_RoleModule ");
303
+            if (strWhere.Trim() != "")
304
+            {
305
+                strSql.Append(" where " + strWhere);
306
+            }
307
+            strSql.Append(" order by " + filedOrder);
308
+            return DbHelperSQL.Query(strSql.ToString());
309
+        }
310
+
311
+        /// <summary>
312
+        /// 获取记录总数
313
+        /// </summary>
314
+        public int GetRecordCount(string strWhere)
315
+        {
316
+            StringBuilder strSql = new StringBuilder();
317
+            strSql.Append("select count(1) FROM T_Sys_RoleModule ");
318
+            if (strWhere.Trim() != "")
319
+            {
320
+                strSql.Append(" where " + strWhere);
321
+            }
322
+            object obj = DbHelperSQL.GetSingle(strSql.ToString());
323
+            if (obj == null)
324
+            {
325
+                return 0;
326
+            }
327
+            else
328
+            {
329
+                return Convert.ToInt32(obj);
330
+            }
331
+        }
332
+        /// <summary>
333
+        /// 分页获取数据列表
334
+        /// </summary>
335
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
336
+        {
337
+            StringBuilder strSql = new StringBuilder();
338
+            strSql.Append("SELECT * FROM ( ");
339
+            strSql.Append(" SELECT ROW_NUMBER() OVER (");
340
+            if (!string.IsNullOrEmpty(orderby.Trim()))
341
+            {
342
+                strSql.Append("order by T." + orderby);
343
+            }
344
+            else
345
+            {
346
+                strSql.Append("order by T.F_Id desc");
347
+            }
348
+            strSql.Append(")AS Row, T.*  from T_Sys_RoleModule T ");
349
+            if (!string.IsNullOrEmpty(strWhere.Trim()))
350
+            {
351
+                strSql.Append(" WHERE " + strWhere);
352
+            }
353
+            strSql.Append(" ) TT");
354
+            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
355
+            return DbHelperSQL.Query(strSql.ToString());
356
+        }
357
+
358
+        /*
359
+		/// <summary>
360
+		/// 分页获取数据列表
361
+		/// </summary>
362
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
363
+		{
364
+			SqlParameter[] parameters = {
365
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
366
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
367
+					new SqlParameter("@PageSize", SqlDbType.Int),
368
+					new SqlParameter("@PageIndex", SqlDbType.Int),
369
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
370
+					new SqlParameter("@OrderType", SqlDbType.Bit),
371
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
372
+					};
373
+			parameters[0].Value = "T_Sys_RoleModule";
374
+			parameters[1].Value = "F_Id";
375
+			parameters[2].Value = PageSize;
376
+			parameters[3].Value = PageIndex;
377
+			parameters[4].Value = 0;
378
+			parameters[5].Value = 0;
379
+			parameters[6].Value = strWhere;	
380
+			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
381
+		}*/
382
+
383
+        #endregion  BasicMethod
384
+        #region  ExtensionMethod
385
+
386
+        #endregion  ExtensionMethod
387
+    }
388
+}
389
+

+ 2 - 71
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/CallCenterApi.Interface.csproj

@@ -193,6 +193,7 @@
193 193
     <Compile Include="Controllers\LogController.cs" />
194 194
     <Compile Include="Controllers\Login\LoginController.cs" />
195 195
     <Compile Include="Controllers\FunctionController.cs" />
196
+    <Compile Include="Controllers\ModuleInfoController.cs" />
196 197
     <Compile Include="Controllers\report\BusinessController.cs" />
197 198
     <Compile Include="Controllers\report\CallInController.cs" />
198 199
     <Compile Include="Controllers\report\DataAnalysisController.cs" />
@@ -211,6 +212,7 @@
211 212
     <Compile Include="Controllers\report\ZuoXiWorkTotalController.cs" />
212 213
     <Compile Include="Controllers\RoleFunctionController.cs" />
213 214
     <Compile Include="Controllers\RoleInfoController.cs" />
215
+    <Compile Include="Controllers\RoleModuleController.cs" />
214 216
     <Compile Include="Controllers\SMSController.cs" />
215 217
     <Compile Include="Controllers\SysConfigController.cs" />
216 218
     <Compile Include="Controllers\tel\CallblackController.cs" />
@@ -286,77 +288,6 @@
286 288
   </ItemGroup>
287 289
   <ItemGroup>
288 290
     <Folder Include="App_Data\" />
289
-    <Folder Include="Views\AddressBook\" />
290
-    <Folder Include="Views\ApplicationsRefresh\" />
291
-    <Folder Include="Views\Area\" />
292
-    <Folder Include="Views\Article\" />
293
-    <Folder Include="Views\Base\" />
294
-    <Folder Include="Views\Business\" />
295
-    <Folder Include="Views\Callblack\" />
296
-    <Folder Include="Views\CallIn\" />
297
-    <Folder Include="Views\Callleave\" />
298
-    <Folder Include="Views\CallOutOpt\" />
299
-    <Folder Include="Views\CallOutScreen\" />
300
-    <Folder Include="Views\Callrecords\" />
301
-    <Folder Include="Views\Class\" />
302
-    <Folder Include="Views\CountyBranch\" />
303
-    <Folder Include="Views\CountyBusiness\" />
304
-    <Folder Include="Views\CountyTel\" />
305
-    <Folder Include="Views\Customer\" />
306
-    <Folder Include="Views\DataAnalysis\" />
307
-    <Folder Include="Views\DaysTalkTime\" />
308
-    <Folder Include="Views\Default\" />
309
-    <Folder Include="Views\Department\" />
310
-    <Folder Include="Views\DeptAssessment\" />
311
-    <Folder Include="Views\Dictionary\" />
312
-    <Folder Include="Views\DutyPhone\" />
313
-    <Folder Include="Views\EmailSend\" />
314
-    <Folder Include="Views\FAQ\" />
315
-    <Folder Include="Views\FlowAnalysis\" />
316
-    <Folder Include="Views\GroupClass\" />
317
-    <Folder Include="Views\Group\" />
318
-    <Folder Include="Views\Home\" />
319
-    <Folder Include="Views\IndexBase\" />
320
-    <Folder Include="Views\IndexCategory\" />
321
-    <Folder Include="Views\Index\" />
322
-    <Folder Include="Views\Info\" />
323
-    <Folder Include="Views\InternalMessages\" />
324
-    <Folder Include="Views\IVRWords\" />
325
-    <Folder Include="Views\KnowledgeClass\" />
326
-    <Folder Include="Views\Knowledge\" />
327
-    <Folder Include="Views\Login\" />
328
-    <Folder Include="Views\Log\" />
329
-    <Folder Include="Views\Mobiledata\" />
330
-    <Folder Include="Views\Module\" />
331
-    <Folder Include="Views\Notice\" />
332
-    <Folder Include="Views\RecordSet\" />
333
-    <Folder Include="Views\Repository\" />
334
-    <Folder Include="Views\RoleF\" />
335
-    <Folder Include="Views\RoleInfo\" />
336
-    <Folder Include="Views\SeatMonitoring\" />
337
-    <Folder Include="Views\ServerMonitor\" />
338
-    <Folder Include="Views\ShangQiuWorkOrder\" />
339
-    <Folder Include="Views\SMS\" />
340
-    <Folder Include="Views\SysConfig\" />
341
-    <Folder Include="Views\TalkTime\" />
342
-    <Folder Include="Views\TelWOReport\" />
343
-    <Folder Include="Views\TotalCall\" />
344
-    <Folder Include="Views\TotalTel\" />
345
-    <Folder Include="Views\UserAccount\" />
346
-    <Folder Include="Views\UserClass\" />
347
-    <Folder Include="Views\UserFeedback\" />
348
-    <Folder Include="Views\UserGrade\" />
349
-    <Folder Include="Views\Validate\" />
350
-    <Folder Include="Views\Web\" />
351
-    <Folder Include="Views\WeiBoReceive\" />
352
-    <Folder Include="Views\WeiBo\" />
353
-    <Folder Include="Views\Workcalendar\" />
354
-    <Folder Include="Views\WorkOrderReport\" />
355
-    <Folder Include="Views\WorkOrder\" />
356
-    <Folder Include="Views\WOVisitRecords\" />
357
-    <Folder Include="Views\YearContrast\" />
358
-    <Folder Include="Views\ZuoXiTongHua\" />
359
-    <Folder Include="Views\ZuoXiWorkTotal\" />
360 291
   </ItemGroup>
361 292
   <ItemGroup>
362 293
     <ProjectReference Include="..\..\..\CallCenterCommon\CallCenter.QuartzService\CallCenter.QuartzService.csproj">

+ 422 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/ModuleInfoController.cs

@@ -0,0 +1,422 @@
1
+using CallCenter.Utility;
2
+using CallCenterApi.Common;
3
+using CallCenterApi.Interface.Controllers.Base;
4
+using System;
5
+using System.Collections.Generic;
6
+using System.Data;
7
+using System.Linq;
8
+using System.Web;
9
+using System.Web.Mvc;
10
+
11
+namespace CallCenterApi.Interface.Controllers
12
+{
13
+    public class ModuleInfoController : BaseController
14
+    {
15
+        // GET: ModuleInfo
16
+
17
+
18
+        #region 菜单
19
+        /// <summary>
20
+        /// 获取菜单列表
21
+        /// </summary>
22
+        /// <returns></returns>
23
+        [Authority]
24
+        public ActionResult GetModuleInfoList()
25
+        {
26
+            DataTable dt = new BLL.T_Sys_ModuleInfo().GetList(0, " F_IsDelete=0 ", " F_Sort").Tables[0];
27
+            return Success("加载成功", dt);
28
+        }
29
+
30
+        /// <summary>
31
+        /// 获取菜单列表
32
+        /// </summary>
33
+        /// <returns></returns>
34
+        [Authority]
35
+        public ActionResult GetModuleInfoListById(int id = 0)
36
+        {
37
+            DataTable dt = new BLL.T_Sys_ModuleInfo().GetList(" isnull(F_ParentID,0)='" + id + "' and F_StateFlag=1 and F_IsDelete=0").Tables[0];
38
+            return Success("列表加载成功", dt);
39
+        }
40
+
41
+        /// <summary>
42
+        /// 获取菜单
43
+        /// </summary>
44
+        /// <returns></returns>
45
+        [Authority]
46
+        public ActionResult GetModuleInfo()
47
+        {
48
+            int id = RequestString.GetInt("id", 0);
49
+            Model.T_Sys_ModuleInfo dModel = new BLL.T_Sys_ModuleInfo().GetModel(id);
50
+
51
+            return Success("获取信息成功", dModel);
52
+        }
53
+
54
+        /// <summary>
55
+        /// 添加菜单
56
+        /// </summary>
57
+        /// <param name="input"></param>
58
+        /// <returns></returns>
59
+        [HttpPost]
60
+        [Authority]
61
+        public ActionResult AddModuleInfo()
62
+        {
63
+            int userId = Utils.StrToInt(User.UserData["F_UserID"], 0);
64
+            Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
65
+
66
+            int id = RequestString.GetInt("id", 0);
67
+            int pid = RequestString.GetInt("pid", 0);
68
+            int ismenu = RequestString.GetInt("ismenu", 0);
69
+            int sort = RequestString.GetInt("sort", 0);
70
+            string name = RequestString.GetFormString("name");
71
+            string code = RequestString.GetFormString("code");
72
+            string opturl = RequestString.GetFormString("opturl");
73
+            string target = RequestString.GetFormString("target");
74
+
75
+            Model.T_Sys_ModuleInfo dModel = new Model.T_Sys_ModuleInfo();
76
+            if (id == 0)
77
+            {
78
+                var list = new BLL.T_Sys_ModuleInfo().GetModelList(" F_ParentID='" + pid + "' and F_ModuleName='" + name + "' ");
79
+                if (list.Count > 0)
80
+                {
81
+                    return Error("已经存在此菜单");
82
+                }
83
+                else
84
+                {
85
+                    dModel.F_ParentID = pid;
86
+                    dModel.F_ModuleCode = code;
87
+                    dModel.F_OptUrl = opturl;
88
+                    dModel.F_Target = target;
89
+                    dModel.F_IsMenu = ismenu;
90
+                    dModel.F_Sort = sort;
91
+                    dModel.F_ModuleName = name;
92
+                    dModel.F_StateFlag = 1;
93
+                    dModel.F_IsDelete = 0;
94
+                    dModel.F_CreateUser = userModel.F_UserCode;
95
+                    dModel.F_CreateTime = DateTime.Now;
96
+                    long n = new BLL.T_Sys_ModuleInfo().Add(dModel);
97
+                    if (n > 0)
98
+                        return Success("添加成功", n);
99
+                    else
100
+                        return Error("添加失败");
101
+                }
102
+            }
103
+            else
104
+            {
105
+                dModel = new BLL.T_Sys_ModuleInfo().GetModel(id);
106
+                if (dModel != null)
107
+                {
108
+                    var list = new BLL.T_Sys_ModuleInfo().GetModelList(" F_ParentID='" + pid + "' and F_ModuleName='" + name + "' and F_Id!='" + id + "' ");
109
+                    if (list.Count > 0)
110
+                    {
111
+                        return Error("已经存在此菜单");
112
+                    }
113
+                    else
114
+                    {
115
+                        dModel.F_ParentID = pid;
116
+                        dModel.F_ModuleCode = code;
117
+                        dModel.F_OptUrl = opturl;
118
+                        dModel.F_Target = target;
119
+                        dModel.F_IsMenu = ismenu;
120
+                        dModel.F_Sort = sort;
121
+                        dModel.F_ModuleName = name;
122
+                        dModel.F_LastModifyUser = userModel.F_UserCode;
123
+                        dModel.F_LastModifyTime = DateTime.Now;
124
+                        long n = new BLL.T_Sys_ModuleInfo().Add(dModel);
125
+
126
+                        if (new BLL.T_Sys_ModuleInfo().Update(dModel))
127
+                            return Success("修改成功");
128
+                        else
129
+                            return Error("修改失败");
130
+                    }
131
+                }
132
+                else
133
+                {
134
+                    return Error("修改失败");
135
+                }
136
+            }
137
+        }
138
+
139
+        /// <summary>
140
+        /// 删除菜单
141
+        /// </summary>
142
+        /// <param name="ids"></param>
143
+        /// <returns></returns>
144
+        [Authority]
145
+        public ActionResult DelModuleInfo(string[] ids)
146
+        {
147
+            if (ids == null || ids.Length <= 0)
148
+                return Error("请选择要删除的菜单");
149
+
150
+            var idStr = string.Join(",", ids);
151
+            if (string.IsNullOrEmpty(idStr.Trim()))
152
+                return Error("请选择要删除的菜单");
153
+
154
+            if (new BLL.T_Sys_ModuleInfo().DeleteList(idStr))
155
+                return Success("删除成功");
156
+            return Error("删除失败");
157
+        }
158
+
159
+        /// <summary>
160
+        /// 删除菜单和其下级菜单
161
+        /// </summary>
162
+        /// <param name="ids"></param>
163
+        /// <returns></returns>
164
+        [Authority]
165
+        public ActionResult DelModuleInfo(long id)
166
+        {
167
+
168
+            if (id > 0)
169
+            {
170
+                int userId = Utils.StrToInt(User.UserData["F_UserID"], 0);
171
+                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
172
+
173
+                var model = new BLL.T_Sys_ModuleInfo().GetModel(id);
174
+                if (DelModuleInfoByPId(id, userModel.F_UserCode))
175
+                {
176
+                    var dModel = new BLL.T_Sys_ModuleInfo().GetModel(id);
177
+                    dModel.F_IsDelete = 1;
178
+                    dModel.F_DeleteUser = userModel.F_UserCode;
179
+                    dModel.F_DeleteTime = DateTime.Now;
180
+
181
+                    new BLL.T_Sys_ModuleInfo().Update(dModel);
182
+                }
183
+                return Success("删除成功");
184
+            }
185
+            else
186
+            {
187
+                return Error("删除失败");
188
+            }
189
+
190
+        }
191
+
192
+        public bool DelModuleInfoByPId(long id,string code)
193
+        {
194
+            bool bl = true;
195
+
196
+            var list = new BLL.T_Sys_ModuleInfo().GetModelList(" F_ParentID ='" + id + "'");
197
+            foreach (var l in list)
198
+            {
199
+                if (DelModuleInfoByPId(l.F_Id, code))
200
+                {
201
+                    var dModel = new BLL.T_Sys_ModuleInfo().GetModel(id);
202
+                    dModel.F_IsDelete = 1;
203
+                    dModel.F_DeleteUser = code;
204
+                    dModel.F_DeleteTime = DateTime.Now;
205
+
206
+                    new BLL.T_Sys_ModuleInfo().Update(dModel);
207
+                }
208
+            }
209
+
210
+            return bl;
211
+        }
212
+        #endregion
213
+
214
+        #region 菜单按钮
215
+        /// <summary>
216
+        /// 获取菜单按钮列表
217
+        /// </summary>
218
+        /// <returns></returns>
219
+        [Authority]
220
+        public ActionResult GetModuleInfoButtonList()
221
+        {
222
+            DataTable dt = new BLL.T_Sys_ModuleInfoButton().GetList(0, " F_IsDelete=0 ", " F_Sort").Tables[0];
223
+            return Success("加载成功", dt);
224
+        }
225
+
226
+        /// <summary>
227
+        /// 获取菜单按钮列表
228
+        /// </summary>
229
+        /// <returns></returns>
230
+        [Authority]
231
+        public ActionResult GetModuleInfoButtonListById(int id = 0)
232
+        {
233
+            DataTable dt = new BLL.T_Sys_ModuleInfoButton().GetList(" isnull(F_ModuleId,0)='" + id + "' and F_StateFlag=1 and F_IsDelete=0").Tables[0];
234
+            return Success("列表加载成功", dt);
235
+        }
236
+
237
+        /// <summary>
238
+        /// 获取菜单按钮
239
+        /// </summary>
240
+        /// <returns></returns>
241
+        [Authority]
242
+        public ActionResult GetModuleInfoButton()
243
+        {
244
+            int id = RequestString.GetInt("id", 0);
245
+            Model.T_Sys_ModuleInfoButton dModel = new BLL.T_Sys_ModuleInfoButton().GetModel(id);
246
+
247
+            return Success("获取信息成功", dModel);
248
+        }
249
+
250
+        /// <summary>
251
+        /// 添加菜单按钮
252
+        /// </summary>
253
+        /// <param name="input"></param>
254
+        /// <returns></returns>
255
+        [HttpPost]
256
+        [Authority]
257
+        public ActionResult AddModuleInfoButton()
258
+        {
259
+            int userId = Utils.StrToInt(User.UserData["F_UserID"], 0);
260
+            Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
261
+
262
+            int id = RequestString.GetInt("id", 0);
263
+            long mid = RequestString.GetInt("mid", 0);
264
+            int pid = RequestString.GetInt("pid", 0);
265
+            int layer = RequestString.GetInt("layer", 0);
266
+            int loction = RequestString.GetInt("loction", 0);
267
+            int issplit = RequestString.GetInt("issplit", 0);
268
+            int sort = RequestString.GetInt("sort", 0);
269
+            string name = RequestString.GetFormString("name");
270
+            string code = RequestString.GetFormString("code");
271
+            string icon = RequestString.GetFormString("icon");
272
+            string jsevent = RequestString.GetFormString("jsevent");
273
+            string remark = RequestString.GetFormString("remark");
274
+
275
+            Model.T_Sys_ModuleInfoButton dModel = new Model.T_Sys_ModuleInfoButton();
276
+            if (id == 0)
277
+            {
278
+                var list = new BLL.T_Sys_ModuleInfoButton().GetModelList(" F_ModuleId='" + mid + "' and F_FullName='" + name + "' ");
279
+                if (list.Count > 0)
280
+                {
281
+                    return Error("已经存在此菜单按钮");
282
+                }
283
+                else
284
+                {
285
+                    dModel.F_ModuleId = mid;
286
+                    dModel.F_ParentId = pid;
287
+                    dModel.F_EnCode = code;
288
+                    dModel.F_Icon = icon;
289
+                    dModel.F_JsEvent = jsevent;
290
+                    dModel.F_Layers = layer;
291
+                    dModel.F_Location = loction;
292
+                    dModel.F_Remark = remark;
293
+                    dModel.F_IsSplit = issplit;
294
+                    dModel.F_Sort = sort;
295
+                    dModel.F_FullName = name;
296
+                    dModel.F_StateFlag = 1;
297
+                    dModel.F_IsDelete = 0;
298
+                    dModel.F_CreateUser = userModel.F_UserCode;
299
+                    dModel.F_CreateTime = DateTime.Now;
300
+                    long n = new BLL.T_Sys_ModuleInfoButton().Add(dModel);
301
+                    if (n > 0)
302
+                        return Success("添加成功", n);
303
+                    else
304
+                        return Error("添加失败");
305
+                }
306
+            }
307
+            else
308
+            {
309
+                dModel = new BLL.T_Sys_ModuleInfoButton().GetModel(id);
310
+                if (dModel != null)
311
+                {
312
+                    var list = new BLL.T_Sys_ModuleInfoButton().GetModelList(" F_ModuleId='" + id + "' and F_FullName='" + name + "' and F_Id!='" + id + "' ");
313
+                    if (list.Count > 0)
314
+                    {
315
+                        return Error("已经存在此菜单按钮");
316
+                    }
317
+                    else
318
+                    {
319
+                        dModel.F_ModuleId = mid;
320
+                        dModel.F_ParentId = pid;
321
+                        dModel.F_EnCode = code;
322
+                        dModel.F_Icon = icon;
323
+                        dModel.F_JsEvent = jsevent;
324
+                        dModel.F_Layers = layer;
325
+                        dModel.F_Location = loction;
326
+                        dModel.F_Remark = remark;
327
+                        dModel.F_IsSplit = issplit;
328
+                        dModel.F_Sort = sort;
329
+                        dModel.F_FullName = name;
330
+                        dModel.F_LastModifyUser = userModel.F_UserCode;
331
+                        dModel.F_LastModifyTime = DateTime.Now;
332
+                        long n = new BLL.T_Sys_ModuleInfoButton().Add(dModel);
333
+
334
+                        if (new BLL.T_Sys_ModuleInfoButton().Update(dModel))
335
+                            return Success("修改成功");
336
+                        else
337
+                            return Error("修改失败");
338
+                    }
339
+                }
340
+                else
341
+                {
342
+                    return Error("修改失败");
343
+                }
344
+            }
345
+        }
346
+
347
+        /// <summary>
348
+        /// 删除菜单按钮
349
+        /// </summary>
350
+        /// <param name="ids"></param>
351
+        /// <returns></returns>
352
+        [Authority]
353
+        public ActionResult DelModuleInfoButton(string[] ids)
354
+        {
355
+            if (ids == null || ids.Length <= 0)
356
+                return Error("请选择要删除的菜单按钮");
357
+
358
+            var idStr = string.Join(",", ids);
359
+            if (string.IsNullOrEmpty(idStr.Trim()))
360
+                return Error("请选择要删除的菜单按钮");
361
+
362
+            if (new BLL.T_Sys_ModuleInfoButton().DeleteList(idStr))
363
+                return Success("删除成功");
364
+            return Error("删除失败");
365
+        }
366
+
367
+        /// <summary>
368
+        /// 删除菜单按钮和其下级菜单按钮
369
+        /// </summary>
370
+        /// <param name="ids"></param>
371
+        /// <returns></returns>
372
+        [Authority]
373
+        public ActionResult DelModuleInfoButton(long id)
374
+        {
375
+
376
+            if (id > 0)
377
+            {
378
+                int userId = Utils.StrToInt(User.UserData["F_UserID"], 0);
379
+                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
380
+
381
+                var model = new BLL.T_Sys_ModuleInfoButton().GetModel(id);
382
+                if (DelModuleInfoButtonByPId(id, userModel.F_UserCode))
383
+                {
384
+                    var dModel = new BLL.T_Sys_ModuleInfoButton().GetModel(id);
385
+                    dModel.F_IsDelete = 1;
386
+                    dModel.F_DeleteUser = userModel.F_UserCode;
387
+                    dModel.F_DeleteTime = DateTime.Now;
388
+
389
+                    new BLL.T_Sys_ModuleInfoButton().Update(dModel);
390
+                }
391
+                return Success("删除成功");
392
+            }
393
+            else
394
+            {
395
+                return Error("删除失败");
396
+            }
397
+
398
+        }
399
+
400
+        public bool DelModuleInfoButtonByPId(long id, string code)
401
+        {
402
+            bool bl = true;
403
+
404
+            var list = new BLL.T_Sys_ModuleInfoButton().GetModelList(" F_ParentID ='" + id + "'");
405
+            foreach (var l in list)
406
+            {
407
+                if (DelModuleInfoButtonByPId(l.F_Id, code))
408
+                {
409
+                    var dModel = new BLL.T_Sys_ModuleInfoButton().GetModel(id);
410
+                    dModel.F_IsDelete = 1;
411
+                    dModel.F_DeleteUser = code;
412
+                    dModel.F_DeleteTime = DateTime.Now;
413
+
414
+                    new BLL.T_Sys_ModuleInfoButton().Update(dModel);
415
+                }
416
+            }
417
+
418
+            return bl;
419
+        }
420
+        #endregion
421
+    }
422
+}

+ 125 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/RoleModuleController.cs

@@ -0,0 +1,125 @@
1
+using CallCenterApi.Common;
2
+using CallCenterApi.DB;
3
+using CallCenterApi.Interface.Controllers.Base;
4
+using System;
5
+using System.Collections.Generic;
6
+using System.Linq;
7
+using System.Web;
8
+using System.Web.Mvc;
9
+
10
+namespace CallCenterApi.Interface.Controllers
11
+{
12
+    public class RoleModuleController : BaseController
13
+    {
14
+        // GET: RoleModule
15
+
16
+        /// <summary>
17
+        /// 根据权限获取当前菜单列表
18
+        /// </summary>
19
+        /// <param name="id">角色id</param>
20
+        /// <returns></returns>
21
+        public ActionResult GetRoleModuleList(int id = 0)
22
+        {
23
+            var moduleFList = new BLL.T_Sys_ModuleInfo().GetModelList(" F_StateFlag=1 and F_IsDelete=0 ");
24
+            var flist = new BLL.T_Sys_RoleModule().GetModelList(" F_RoleId=" + id + " and F_ModuleType=1 and F_IsDelete=0 ").Select(x => x.F_RoleId).ToList();
25
+
26
+            var list = moduleFList.Select(x => new menutree
27
+            {
28
+                id = "module_" + x.F_Id,
29
+                pid = "module_" + x.F_ParentID,
30
+                name = x.F_ModuleName,
31
+                sort = x.F_Sort,
32
+                ischecked = flist.Where(y => y == x.F_Id).Count() > 0 ? true : false
33
+            }).OrderBy(p => p.sort);
34
+
35
+            var moduleFBList = new BLL.T_Sys_ModuleInfoButton().GetModelList(" F_StateFlag=1 and F_IsDelete=0 ");
36
+            var blist = new BLL.T_Sys_RoleModule().GetModelList(" F_RoleId=" + id + " and F_ModuleType=2 and F_IsDelete=0 ").Select(x => x.F_RoleId).ToList();
37
+
38
+            list.Concat(moduleFBList.Select(x => new menutree
39
+            {
40
+                id = "button_" + x.F_Id,
41
+                pid = "module_" + x.F_ModuleId,
42
+                name = x.F_FullName,
43
+                sort = x.F_Sort,
44
+                ischecked = blist.Where(y => y == x.F_Id).Count() > 0 ? true : false
45
+            }).OrderBy(p => p.sort));
46
+
47
+            return Success("加载成功",list);
48
+        }
49
+
50
+        /// <summary>
51
+        /// ztree类
52
+        /// </summary>
53
+        public class menutree
54
+        {
55
+            public string id { get; set; }
56
+            public string pid { get; set; }
57
+            public string name { get; set; }
58
+            public int? sort { get; set; }
59
+            public bool ischecked { get; set; }
60
+        }
61
+
62
+        /// <summary>
63
+        /// 保存角色权限
64
+        /// </summary>
65
+        /// <param name="ids"></param>
66
+        /// <param name="roleId"></param>
67
+        /// <returns></returns>
68
+        public ActionResult SaveRoleModule(string[] ids, int rid = 0)
69
+        {
70
+            int userId = Utils.StrToInt(User.UserData["F_UserID"], 0);
71
+            Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
72
+
73
+            if (ids == null)
74
+                return Error("参数错误");
75
+            Model.T_Sys_RoleFunction RoleModel = new Model.T_Sys_RoleFunction();
76
+
77
+            if (rid != 0)
78
+            {
79
+                var role = new BLL.T_Sys_RoleInfo().GetModel(rid);
80
+                if (role != null)
81
+                {
82
+                    List<string> sqls = new List<string>();
83
+                    string sql = " update T_Sys_RoleModule set F_IsDelete=1,F_DeleteUser='" + userModel.F_UserCode + "',F_DeleteTime=getdate() where F_RoleId=" + rid + " and F_IsDelete=0;";
84
+                    sqls.Add(sql);
85
+                    foreach (string id in ids)
86
+                    {
87
+                        string[] fb = id.Split('_');
88
+                        if (fb[0] == "module")
89
+                        {
90
+                            var fun = new BLL.T_Sys_ModuleInfo().GetModel(Int32.Parse(fb[1]));
91
+                            if (fun != null)
92
+                            {
93
+                                string sql1 = " insert into T_Sys_RoleModule(F_RoleId,F_RoleType,F_ModuleId,F_ModuleType,F_State,F_CreateUser,F_CreateTime,F_IsDelete)"
94
+                                    + " values(" + rid + ",1," + fun.F_Id + ",1,1,'" + userModel.F_UserCode + "',getdate(),0);";
95
+                                sqls.Add(sql1);
96
+                            }
97
+                        }
98
+                        else if (fb[0] == "button")
99
+                        {
100
+                            var but = new BLL.T_Sys_ModuleInfoButton().GetModel(Int32.Parse(fb[1]));
101
+                            if (but != null)
102
+                            {
103
+                                string sql1 = " insert into T_Sys_RoleModule(F_RoleId,F_RoleType,F_ModuleId,F_ModuleType,F_State,F_CreateUser,F_CreateTime,F_IsDelete)"
104
+                                    + " values(" + rid + ",1," + but.F_Id + ",2,1,'" + userModel.F_UserCode + "',getdate(),0);";
105
+                                sqls.Add(sql1);
106
+                            }
107
+                        }
108
+                    }
109
+                    int n = DbHelperSQL.ExecuteSqlTransaction(sqls);
110
+
111
+                    return Success("权限设置成功");
112
+                }
113
+                else
114
+                {
115
+                    return Error("参数错误");
116
+                }
117
+            }
118
+            else
119
+            {
120
+                return Error("参数错误");
121
+            }
122
+
123
+        }
124
+    }
125
+}

+ 3 - 0
CallCenterApi/CallCenterApi.Model/CallCenterApi.Model.csproj

@@ -62,6 +62,9 @@
62 62
     <Compile Include="T_Sys_Group.cs" />
63 63
     <Compile Include="T_Sys_GroupClass.cs" />
64 64
     <Compile Include="T_Sys_IVRWords.cs" />
65
+    <Compile Include="T_Sys_ModuleInfo.cs" />
66
+    <Compile Include="T_Sys_ModuleInfoButton.cs" />
67
+    <Compile Include="T_Sys_RoleModule.cs" />
65 68
     <Compile Include="T_Sys_SeatPermissionConfig.cs" />
66 69
     <Compile Include="T_Sys_UserClass.cs" />
67 70
     <Compile Include="T_Sys_Users.cs" />

+ 188 - 0
CallCenterApi/CallCenterApi.Model/T_Sys_ModuleInfo.cs

@@ -0,0 +1,188 @@
1
+using System;
2
+namespace CallCenterApi.Model
3
+{
4
+    /// <summary>
5
+    /// T_Sys_ModuleInfo:实体类(属性说明自动提取数据库字段的描述信息)
6
+    /// </summary>
7
+    [Serializable]
8
+    public partial class T_Sys_ModuleInfo
9
+    {
10
+        public T_Sys_ModuleInfo()
11
+        { }
12
+        #region Model
13
+        private long _f_id;
14
+        private string _f_modulecode;
15
+        private string _f_modulename;
16
+        private long? _f_parentid;
17
+        private int? _f_ismenu;
18
+        private string _f_remark;
19
+        private int? _f_sort = 0;
20
+        private int? _f_stateflag = 1;
21
+        private string _f_target;
22
+        private string _f_button;
23
+        private string _f_opturl;
24
+        private string _f_imgurl;
25
+        private string _f_createuser;
26
+        private DateTime? _f_createtime;
27
+        private string _f_lastmodifyuser;
28
+        private DateTime? _f_lastmodifytime;
29
+        private int? _f_isdelete;
30
+        private string _f_deleteuser;
31
+        private DateTime? _f_deletetime;
32
+        /// <summary>
33
+        /// 功能模块Id
34
+        /// </summary>
35
+        public long F_Id
36
+        {
37
+            set { _f_id = value; }
38
+            get { return _f_id; }
39
+        }
40
+        /// <summary>
41
+        /// 
42
+        /// </summary>
43
+        public string F_ModuleCode
44
+        {
45
+            set { _f_modulecode = value; }
46
+            get { return _f_modulecode; }
47
+        }
48
+        /// <summary>
49
+        /// 
50
+        /// </summary>
51
+        public string F_ModuleName
52
+        {
53
+            set { _f_modulename = value; }
54
+            get { return _f_modulename; }
55
+        }
56
+        /// <summary>
57
+        /// 父级ID
58
+        /// </summary>
59
+        public long? F_ParentID
60
+        {
61
+            set { _f_parentid = value; }
62
+            get { return _f_parentid; }
63
+        }
64
+        /// <summary>
65
+        /// 菜单
66
+        /// </summary>
67
+        public int? F_IsMenu
68
+        {
69
+            set { _f_ismenu = value; }
70
+            get { return _f_ismenu; }
71
+        }
72
+        /// <summary>
73
+        /// 
74
+        /// </summary>
75
+        public string F_Remark
76
+        {
77
+            set { _f_remark = value; }
78
+            get { return _f_remark; }
79
+        }
80
+        /// <summary>
81
+        /// 本节点顺序号(如:1、2、3)
82
+        /// </summary>
83
+        public int? F_Sort
84
+        {
85
+            set { _f_sort = value; }
86
+            get { return _f_sort; }
87
+        }
88
+        /// <summary>
89
+        /// 功能状态-(0:不可以用;1:可用)
90
+        /// </summary>
91
+        public int? F_StateFlag
92
+        {
93
+            set { _f_stateflag = value; }
94
+            get { return _f_stateflag; }
95
+        }
96
+        /// <summary>
97
+        /// 目标
98
+        /// </summary>
99
+        public string F_Target
100
+        {
101
+            set { _f_target = value; }
102
+            get { return _f_target; }
103
+        }
104
+        /// <summary>
105
+        /// 菜单后附属的按钮样式
106
+        /// </summary>
107
+        public string F_Button
108
+        {
109
+            set { _f_button = value; }
110
+            get { return _f_button; }
111
+        }
112
+        /// <summary>
113
+        /// 功能地址
114
+        /// </summary>
115
+        public string F_OptUrl
116
+        {
117
+            set { _f_opturl = value; }
118
+            get { return _f_opturl; }
119
+        }
120
+        /// <summary>
121
+        /// 图标路径
122
+        /// </summary>
123
+        public string F_ImgUrl
124
+        {
125
+            set { _f_imgurl = value; }
126
+            get { return _f_imgurl; }
127
+        }
128
+        /// <summary>
129
+        /// 创建人
130
+        /// </summary>
131
+        public string F_CreateUser
132
+        {
133
+            set { _f_createuser = value; }
134
+            get { return _f_createuser; }
135
+        }
136
+        /// <summary>
137
+        /// 创建时间
138
+        /// </summary>
139
+        public DateTime? F_CreateTime
140
+        {
141
+            set { _f_createtime = value; }
142
+            get { return _f_createtime; }
143
+        }
144
+        /// <summary>
145
+        /// 修改人
146
+        /// </summary>
147
+        public string F_LastModifyUser
148
+        {
149
+            set { _f_lastmodifyuser = value; }
150
+            get { return _f_lastmodifyuser; }
151
+        }
152
+        /// <summary>
153
+        /// 修改时间
154
+        /// </summary>
155
+        public DateTime? F_LastModifyTime
156
+        {
157
+            set { _f_lastmodifytime = value; }
158
+            get { return _f_lastmodifytime; }
159
+        }
160
+        /// <summary>
161
+        /// 
162
+        /// </summary>
163
+        public int? F_IsDelete
164
+        {
165
+            set { _f_isdelete = value; }
166
+            get { return _f_isdelete; }
167
+        }
168
+        /// <summary>
169
+        /// 删除人
170
+        /// </summary>
171
+        public string F_DeleteUser
172
+        {
173
+            set { _f_deleteuser = value; }
174
+            get { return _f_deleteuser; }
175
+        }
176
+        /// <summary>
177
+        /// 删除时间
178
+        /// </summary>
179
+        public DateTime? F_DeleteTime
180
+        {
181
+            set { _f_deletetime = value; }
182
+            get { return _f_deletetime; }
183
+        }
184
+        #endregion Model
185
+
186
+    }
187
+}
188
+

+ 206 - 0
CallCenterApi/CallCenterApi.Model/T_Sys_ModuleInfoButton.cs

@@ -0,0 +1,206 @@
1
+using System;
2
+namespace CallCenterApi.Model
3
+{
4
+    /// <summary>
5
+    /// 模块按钮
6
+    /// </summary>
7
+    [Serializable]
8
+    public partial class T_Sys_ModuleInfoButton
9
+    {
10
+        public T_Sys_ModuleInfoButton()
11
+        { }
12
+        #region Model
13
+        private long _f_id;
14
+        private long? _f_moduleid;
15
+        private long? _f_parentid;
16
+        private int? _f_layers;
17
+        private string _f_encode;
18
+        private string _f_fullname;
19
+        private string _f_icon;
20
+        private int? _f_location;
21
+        private string _f_jsevent;
22
+        private string _f_urladdress;
23
+        private int? _f_issplit;
24
+        private int? _f_sort;
25
+        private int? _f_stateflag;
26
+        private string _f_remark;
27
+        private string _f_createuser;
28
+        private DateTime? _f_createtime;
29
+        private string _f_lastmodifyuser;
30
+        private DateTime? _f_lastmodifytime;
31
+        private int? _f_isdelete;
32
+        private string _f_deleteuser;
33
+        private DateTime? _f_deletetime;
34
+        /// <summary>
35
+        /// 按钮主键
36
+        /// </summary>
37
+        public long F_Id
38
+        {
39
+            set { _f_id = value; }
40
+            get { return _f_id; }
41
+        }
42
+        /// <summary>
43
+        /// 模块主键
44
+        /// </summary>
45
+        public long? F_ModuleId
46
+        {
47
+            set { _f_moduleid = value; }
48
+            get { return _f_moduleid; }
49
+        }
50
+        /// <summary>
51
+        /// 父级
52
+        /// </summary>
53
+        public long? F_ParentId
54
+        {
55
+            set { _f_parentid = value; }
56
+            get { return _f_parentid; }
57
+        }
58
+        /// <summary>
59
+        /// 层次
60
+        /// </summary>
61
+        public int? F_Layers
62
+        {
63
+            set { _f_layers = value; }
64
+            get { return _f_layers; }
65
+        }
66
+        /// <summary>
67
+        /// 编码
68
+        /// </summary>
69
+        public string F_EnCode
70
+        {
71
+            set { _f_encode = value; }
72
+            get { return _f_encode; }
73
+        }
74
+        /// <summary>
75
+        /// 名称
76
+        /// </summary>
77
+        public string F_FullName
78
+        {
79
+            set { _f_fullname = value; }
80
+            get { return _f_fullname; }
81
+        }
82
+        /// <summary>
83
+        /// 图标
84
+        /// </summary>
85
+        public string F_Icon
86
+        {
87
+            set { _f_icon = value; }
88
+            get { return _f_icon; }
89
+        }
90
+        /// <summary>
91
+        /// 位置
92
+        /// </summary>
93
+        public int? F_Location
94
+        {
95
+            set { _f_location = value; }
96
+            get { return _f_location; }
97
+        }
98
+        /// <summary>
99
+        /// 事件
100
+        /// </summary>
101
+        public string F_JsEvent
102
+        {
103
+            set { _f_jsevent = value; }
104
+            get { return _f_jsevent; }
105
+        }
106
+        /// <summary>
107
+        /// 连接
108
+        /// </summary>
109
+        public string F_UrlAddress
110
+        {
111
+            set { _f_urladdress = value; }
112
+            get { return _f_urladdress; }
113
+        }
114
+        /// <summary>
115
+        /// 分开线(0否,1是)
116
+        /// </summary>
117
+        public int? F_IsSplit
118
+        {
119
+            set { _f_issplit = value; }
120
+            get { return _f_issplit; }
121
+        }
122
+        /// <summary>
123
+        /// 排序码
124
+        /// </summary>
125
+        public int? F_Sort
126
+        {
127
+            set { _f_sort = value; }
128
+            get { return _f_sort; }
129
+        }
130
+        /// <summary>
131
+        /// 功能状态(0:不可以用;1:可用 2:表示删除)
132
+        /// </summary>
133
+        public int? F_StateFlag
134
+        {
135
+            set { _f_stateflag = value; }
136
+            get { return _f_stateflag; }
137
+        }
138
+        /// <summary>
139
+        /// 备注
140
+        /// </summary>
141
+        public string F_Remark
142
+        {
143
+            set { _f_remark = value; }
144
+            get { return _f_remark; }
145
+        }
146
+        /// <summary>
147
+        /// 创建人
148
+        /// </summary>
149
+        public string F_CreateUser
150
+        {
151
+            set { _f_createuser = value; }
152
+            get { return _f_createuser; }
153
+        }
154
+        /// <summary>
155
+        /// 创建时间
156
+        /// </summary>
157
+        public DateTime? F_CreateTime
158
+        {
159
+            set { _f_createtime = value; }
160
+            get { return _f_createtime; }
161
+        }
162
+        /// <summary>
163
+        /// 修改人
164
+        /// </summary>
165
+        public string F_LastModifyUser
166
+        {
167
+            set { _f_lastmodifyuser = value; }
168
+            get { return _f_lastmodifyuser; }
169
+        }
170
+        /// <summary>
171
+        /// 修改时间
172
+        /// </summary>
173
+        public DateTime? F_LastModifyTime
174
+        {
175
+            set { _f_lastmodifytime = value; }
176
+            get { return _f_lastmodifytime; }
177
+        }
178
+        /// <summary>
179
+        /// 
180
+        /// </summary>
181
+        public int? F_IsDelete
182
+        {
183
+            set { _f_isdelete = value; }
184
+            get { return _f_isdelete; }
185
+        }
186
+        /// <summary>
187
+        /// 删除人
188
+        /// </summary>
189
+        public string F_DeleteUser
190
+        {
191
+            set { _f_deleteuser = value; }
192
+            get { return _f_deleteuser; }
193
+        }
194
+        /// <summary>
195
+        /// 删除时间
196
+        /// </summary>
197
+        public DateTime? F_DeleteTime
198
+        {
199
+            set { _f_deletetime = value; }
200
+            get { return _f_deletetime; }
201
+        }
202
+        #endregion Model
203
+
204
+    }
205
+}
206
+

+ 134 - 0
CallCenterApi/CallCenterApi.Model/T_Sys_RoleModule.cs

@@ -0,0 +1,134 @@
1
+using System;
2
+namespace CallCenterApi.Model
3
+{
4
+    /// <summary>
5
+    /// T_Sys_RoleModule:实体类(属性说明自动提取数据库字段的描述信息)
6
+    /// </summary>
7
+    [Serializable]
8
+    public partial class T_Sys_RoleModule
9
+    {
10
+        public T_Sys_RoleModule()
11
+        { }
12
+        #region Model
13
+        private long _f_id;
14
+        private long? _f_roleid;
15
+        private int? _f_roletype;
16
+        private long? _f_moduleid;
17
+        private int? _f_moduletype;
18
+        private int? _f_state;
19
+        private string _f_createuser;
20
+        private DateTime? _f_createtime;
21
+        private string _f_updateuser;
22
+        private DateTime? _f_updatetime;
23
+        private int? _f_isdelete;
24
+        private string _f_deleteuser;
25
+        private DateTime? _f_deletetime;
26
+        /// <summary>
27
+        /// 
28
+        /// </summary>
29
+        public long F_Id
30
+        {
31
+            set { _f_id = value; }
32
+            get { return _f_id; }
33
+        }
34
+        /// <summary>
35
+        /// 
36
+        /// </summary>
37
+        public long? F_RoleId
38
+        {
39
+            set { _f_roleid = value; }
40
+            get { return _f_roleid; }
41
+        }
42
+        /// <summary>
43
+        /// 
44
+        /// </summary>
45
+        public int? F_RoleType
46
+        {
47
+            set { _f_roletype = value; }
48
+            get { return _f_roletype; }
49
+        }
50
+        /// <summary>
51
+        /// 
52
+        /// </summary>
53
+        public long? F_ModuleId
54
+        {
55
+            set { _f_moduleid = value; }
56
+            get { return _f_moduleid; }
57
+        }
58
+        /// <summary>
59
+        /// 
60
+        /// </summary>
61
+        public int? F_ModuleType
62
+        {
63
+            set { _f_moduletype = value; }
64
+            get { return _f_moduletype; }
65
+        }
66
+        /// <summary>
67
+        /// 
68
+        /// </summary>
69
+        public int? F_State
70
+        {
71
+            set { _f_state = value; }
72
+            get { return _f_state; }
73
+        }
74
+        /// <summary>
75
+        /// 
76
+        /// </summary>
77
+        public string F_CreateUser
78
+        {
79
+            set { _f_createuser = value; }
80
+            get { return _f_createuser; }
81
+        }
82
+        /// <summary>
83
+        /// 
84
+        /// </summary>
85
+        public DateTime? F_CreateTime
86
+        {
87
+            set { _f_createtime = value; }
88
+            get { return _f_createtime; }
89
+        }
90
+        /// <summary>
91
+        /// 
92
+        /// </summary>
93
+        public string F_UpdateUser
94
+        {
95
+            set { _f_updateuser = value; }
96
+            get { return _f_updateuser; }
97
+        }
98
+        /// <summary>
99
+        /// 
100
+        /// </summary>
101
+        public DateTime? F_UpdateTime
102
+        {
103
+            set { _f_updatetime = value; }
104
+            get { return _f_updatetime; }
105
+        }
106
+        /// <summary>
107
+        /// 
108
+        /// </summary>
109
+        public int? F_IsDelete
110
+        {
111
+            set { _f_isdelete = value; }
112
+            get { return _f_isdelete; }
113
+        }
114
+        /// <summary>
115
+        /// 
116
+        /// </summary>
117
+        public string F_DeleteUser
118
+        {
119
+            set { _f_deleteuser = value; }
120
+            get { return _f_deleteuser; }
121
+        }
122
+        /// <summary>
123
+        /// 
124
+        /// </summary>
125
+        public DateTime? F_DeleteTime
126
+        {
127
+            set { _f_deletetime = value; }
128
+            get { return _f_deletetime; }
129
+        }
130
+        #endregion Model
131
+
132
+    }
133
+}
134
+