Esempio n. 1
0
 /// <summary>
 /// 获取最大编号
 /// </summary>
 /// <returns></returns>
 public object GetMaxCode()
 {
     return(DataFactory.DbUtils().GetMax("BPMS_User", "SortCode"));
 }
Esempio n. 2
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 /// <param name="KeyValue">主键</param>
 /// <returns></returns>
 public BPMS_User GetEntity(string KeyValue)
 {
     return(DataFactory.DbUtils().GetModelById <BPMS_User>("UserId", KeyValue));
 }
Esempio n. 3
0
 /// <summary>
 /// 登录验证
 /// </summary>
 /// <param name="Account">登录账户</param>
 /// <returns></returns>
 public BPMS_User GetEntityByAccount(string Account)
 {
     return(DataFactory.DbUtils().GetModelById <BPMS_User>("Account", Account));
 }
Esempio n. 4
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 /// <param name="KeyValue">主键</param>
 /// <returns></returns>
 public int Delete(string KeyValue)
 {
     return(DataFactory.DbUtils().Delete("BPMS_ItemDetails", "ItemDetailsId", KeyValue));
 }
Esempio n. 5
0
 /// <summary>
 /// 批量删除数据
 /// </summary>
 /// <param name="KeyValue">主键</param>
 /// <returns></returns>
 public int BatchDelete(string[] KeyValue)
 {
     return(DataFactory.DbUtils().BatchDelete("BPMS_User", "UserId", KeyValue));
 }
Esempio n. 6
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 /// <param name="entity">实体类</param>
 /// <returns></returns>
 public int UpdateNotLog(BPMS_User entity)
 {
     return(DataFactory.DbUtils().Update(entity, "UserId"));
 }
Esempio n. 7
0
 /// <summary>
 /// 批量删除数据
 /// </summary>
 /// <param name="KeyValue">主键</param>
 /// <returns></returns>
 public int BatchDelete(string[] KeyValue)
 {
     return(DataFactory.DbUtils().BatchDelete("BPMS_SysMenu", "MenuId", KeyValue));
 }
Esempio n. 8
0
 /// <summary>
 /// 批量删除数据
 /// </summary>
 /// <param name="KeyValue">主键</param>
 /// <returns></returns>
 public int BatchDelete(string[] KeyValue)
 {
     return(DataFactory.DbUtils().BatchDelete("BASE_News", "NewsId", KeyValue));
 }
Esempio n. 9
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 /// <param name="KeyValue">主键</param>
 /// <returns></returns>
 public BASE_News GetEntity(string KeyValue)
 {
     return(DataFactory.DbUtils().GetModelById <BASE_News>("NewsId", KeyValue));
 }
Esempio n. 10
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 /// <param name="entity">实体类</param>
 /// <returns></returns>
 public int Insert(BASE_News entity)
 {
     entity.SortCode = CommonHelper.GetInt(this.GetMaxCode());
     return(DataFactory.DbUtils().Insert(entity));
 }
Esempio n. 11
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 /// <param name="entity">实体类</param>
 /// <returns></returns>
 public int Update(BASE_News entity)
 {
     return(DataFactory.DbUtils().Update(entity, "NewsId"));
 }
Esempio n. 12
0
 /// <summary>
 /// 获取最大编号
 /// </summary>
 /// <returns></returns>
 public object GetMaxCode()
 {
     return(DataFactory.DbUtils().GetMax("BASE_News", "SortCode"));
 }
Esempio n. 13
0
 /// <summary>
 /// 获取记录总数
 /// </summary>
 /// <param name="KeyValue">主键值</param>
 /// <returns></returns>
 public int GetRecordCount(string KeyValue)
 {
     return(DataFactory.DbUtils().RecordCount("BPMS_SysMenu", "MenuId", KeyValue));
 }
Esempio n. 14
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 /// <param name="KeyValue">主键</param>
 /// <returns></returns>
 public BPMS_SysMenu GetEntity(string KeyValue)
 {
     return(DataFactory.DbUtils().GetModelById <BPMS_SysMenu>("MenuId", KeyValue));
 }
Esempio n. 15
0
 /// <summary>
 /// 获取记录总数
 /// </summary>
 /// <param name="KeyValue">主键值</param>
 /// <returns></returns>
 public int GetRecordCount(string KeyValue)
 {
     return(DataFactory.DbUtils().RecordCount("BPMS_User", "UserId", KeyValue));
 }
Esempio n. 16
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 /// <param name="KeyValue">主键</param>
 /// <returns></returns>
 public BPMS_ItemDetails GetEntity(string KeyValue)
 {
     return(DataFactory.DbUtils().GetModelById <BPMS_ItemDetails>("ItemDetailsId", KeyValue));
 }
Esempio n. 17
0
 /// <summary>
 /// 获取记录总数(带条件)
 /// </summary>
 /// <param name="where">条件</param>
 /// <param name="param">参数化</param>
 /// <returns></returns>
 public int GetRecordCount(StringBuilder where, SqlParam[] param)
 {
     return(DataFactory.DbUtils().RecordCount("BPMS_User", where, param));
 }
Esempio n. 18
0
 /// <summary>
 /// 获取记录总数
 /// </summary>
 /// <param name="KeyValue">主键值</param>
 /// <returns></returns>
 public int GetRecordCount(string KeyValue)
 {
     return(DataFactory.DbUtils().RecordCount("BPMS_ItemDetails", "ItemDetailsId", KeyValue));
 }
Esempio n. 19
0
        /// <summary>
        /// 获取 角色,用户 按钮权限
        /// </summary>
        /// <param name="UserId">用户主键</param>
        /// <returns></returns>
        public IList GetButtonPermission(string UserId)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append(@"SELECT  BID.UserId ,
                                    BID.MenuId ,
                                    BID.ButtonId ,
                                    B.FullName ,
                                    B.Img ,
                                    B.Event ,
                                    B.Control_ID ,
                                    B.Category ,
                                    B.Split ,
                                    B.Description,
                                    MB.SortCode
                            FROM    BPMS_Button B
                                    INNER JOIN ( SELECT UR.UserId AS UserId ,
                                                        RMB.MenuId AS MenuId ,
                                                        RMB.ButtonId AS ButtonId
                                                 FROM   BPMS_UserRole UR
                                                        INNER JOIN BPMS_RoleMenuButton RMB ON UR.RoleId = RMB.RoleId
                                                 GROUP BY RMB.MenuId ,
                                                        RMB.ButtonId ,
                                                        UR.UserId
                                                 UNION
                                                 SELECT UM.UserId AS UserId ,
                                                        UM.MenuId AS MenuId ,
                                                        UMB.ButtonId AS ButtonId
                                                 FROM   BPMS_UserMenu UM
                                                        INNER JOIN BPMS_UserMenuButton UMB ON UM.MenuId = UMB.MenuId
                                                 GROUP BY UM.UserId ,
                                                        UM.MenuId ,
                                                        UMB.ButtonId
                                                 UNION
                                                 SELECT U.UserId ,
                                                        RMB.MenuId ,
                                                        RMB.ButtonId
                                                 FROM   BPMS_User u
                                                        INNER JOIN BPMS_RoleMenuButton RMB ON u.RoleId = RMB.RoleId
                                                 WHERE  U.UserId = @UserId
                                               ) BID ON B.ButtonId = BID.ButtonId
                                    INNER JOIN BPMS_SysMenuButton MB ON BID.MenuId = MB.MenuId
                                                                            AND BID.ButtonId = MB.ButtonId
                            WHERE   BID.UserId = @UserId AND B.Enabled = 1
                            GROUP BY BID.UserId ,
                                    BID.MenuId ,
                                    BID.ButtonId ,
                                    B.FullName ,
                                    B.Img ,
                                    B.Event ,
                                    B.Control_ID ,
                                    B.Category ,
                                    B.Split ,
                                    B.Description ,
                                    MB.SortCode
                            ORDER BY MB.SortCode");
            SqlParam[] param =
            {
                new SqlParam("@UserId", UserId)
            };
            return(DataFactory.SqlHelper().GetDataListBySQL <BPMS_ButtonPermission>(strSql, param));
        }
Esempio n. 20
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 /// <param name="KeyValue">主键</param>
 /// <returns></returns>
 public BPMS_Shortcut GetEntity(string KeyValue)
 {
     return(DataFactory.DbUtils().GetModelById <BPMS_Shortcut>("ShortcutId", KeyValue));
 }