Beispiel #1
0
        /// <summary>
        /// 保存用户生产线权限
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="list_right"></param>
        /// <returns></returns>
        internal string SaveUserTrimLine(List <EapUserTrimLine> list_line)
        {
            //打开事务
            string ret = Oracle.GetOracle().BeginTran();

            if (ret != string.Empty)
            {
                return(ret);
            }

            //删除已经拥有的权限
            ret = DalOracle.GetDalOracle().DelUserLine(list_line[0].USER_ID);
            if (ret != string.Empty)
            {
                Oracle.GetOracle().Rollback();
                return(ret);
            }

            //创建用户权限
            foreach (EapUserTrimLine sub in list_line)
            {
                ret = DalOracle.GetDalOracle().CreateUserLine(sub);
                if (ret != string.Empty)
                {
                    Oracle.GetOracle().Rollback();
                    return(ret);
                }
            }

            Oracle.GetOracle().Commit();
            return(string.Empty);
        }
Beispiel #2
0
        /// <summary>
        /// 修改菜单数据
        /// </summary>
        /// <param name="modify">修改实体</param>
        /// <returns>错误消息,为空表示成功</returns>
        internal string ModifyMenu(EapMenu modify_entity)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().ModifyMenu(modify_entity));
            }

            return(string.Empty);
        }
Beispiel #3
0
        /// <summary>
        /// 修改系统参数
        /// </summary>
        /// <param name="modify_entity">修改实体</param>
        /// <returns>错误消息,为空表示成功</returns>
        internal string ModifySystemParameter(EapParameter modify_entity)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().ModifySystemParameter(modify_entity));
            }

            return(string.Empty);
        }
Beispiel #4
0
        /// <summary>
        /// 删除系统参数
        /// </summary>
        /// <param name="para_id">删除条件,系统参数ID</param>
        /// <returns>错误消息,为空表示成功</returns>
        internal string DelSystemParameter(string para_id)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().DelSystemParameter(para_id));
            }

            return(string.Empty);
        }
Beispiel #5
0
        /// <summary>
        /// 新增菜单数据
        /// </summary>
        /// <param name="add_entity">新增实体</param>
        /// <returns>错误消息,为空表示成功</returns>
        internal string AddMenu(EapMenu add_entity)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().AddMenu(add_entity));
            }

            return(string.Empty);
        }
Beispiel #6
0
        /// <summary>
        /// 添加值列表明细数据
        /// </summary>
        /// <param name="add_entity">新增实体</param>
        /// <returns>错误消息,为空表示成功</returns>
        internal string AddValueListDetail(EapValueListDetail add_entity)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().AddValueListDetail(add_entity));
            }

            return(string.Empty);
        }
Beispiel #7
0
        /// <summary>
        /// 删除值列表明细数据
        /// </summary>
        /// <param name="vlist_id">删除条件,值列表ID</param>
        /// <returns>错误消息,为空表示成功</returns>
        internal string DelValueListDetail(EapValueListDetail del_entity)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().DelValueListDetail(del_entity));
            }

            return(string.Empty);
        }
Beispiel #8
0
        /// <summary>
        /// 修改值列表数据
        /// </summary>
        /// <param name="modify_entity">修改实体</param>
        /// <returns>错误消息,为空表示成功</returns>
        internal string ModifyValueList(EapValueList modify_entity)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().ModifyValueList(modify_entity));
            }

            return(string.Empty);
        }
Beispiel #9
0
        /// <summary>
        /// 删除值列表数据
        /// </summary>
        /// <param name="vlist_id">删除条件,值列表ID</param>
        /// <returns>错误消息,为空表示成功</returns>
        internal string DelValueList(string vlist_id)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().DelValueList(vlist_id));
            }

            return(string.Empty);
        }
Beispiel #10
0
        /// <summary>
        /// 根据用户获取权限
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        internal List <EapUserMenuRight> GetAuthoritybyUser(string userid)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().GetAuthoritybyUser(userid));
            }

            return(null);
        }
Beispiel #11
0
        /// <summary>
        /// 判断菜单是否存在
        /// </summary>
        /// <param name="menu_id">菜单编码</param>
        /// <returns>存在返回true,不存在返回false</returns>
        internal bool IsExistMenu(string menu_id)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().IsExistMenu(menu_id));
            }

            return(false);
        }
Beispiel #12
0
        /// <summary>
        /// 获取所有权限
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        internal List <EapMenu> GetUserAuthority()
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().GetUserAuthority());
            }

            return(null);
        }
Beispiel #13
0
        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        internal string AddUser(EapUser user)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().AddUser(user));
            }

            return(string.Empty);
        }
Beispiel #14
0
        internal bool IsUserExist(string userid)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().IsUserExist(userid));
            }

            return(false);
        }
Beispiel #15
0
        /// <summary>
        /// 上传文件数据到数据库
        /// </summary>
        /// <param name="file">文件实体</param>
        /// <returns>错误消息,为空表示成功</returns>
        internal string UploadFile(EapFile file)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().UploadFile(file));
            }

            return(string.Empty);
        }
Beispiel #16
0
        /// <summary>
        /// 添加系统参数
        /// </summary>
        /// <param name="add_entity">新增实体</param>
        /// <returns>错误消息,为空表示成功</returns>
        internal string AddSystemParameter(EapParameter add_entity)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().AddSystemParameter(add_entity));
            }

            return(string.Empty);
        }
Beispiel #17
0
        /// <summary>
        /// 根据菜单ID获取菜单信息
        /// </summary>
        /// <param name="menuid">菜单ID</param>
        /// <returns>菜单信息</returns>
        internal EapMenu GetMenuById(string menuid)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().GetMenuById(menuid));
            }

            return(null);
        }
Beispiel #18
0
        /// <summary>
        /// 删除文件
        /// </summary>
        /// <param name="fileid">文件ID</param>
        /// <returns>错误消息,为空表示成功</returns>
        internal string DeleteFile(string fileid)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().DeleteFile(fileid));
            }

            return(string.Empty);
        }
Beispiel #19
0
        /// <summary>
        /// 从数据库下载文件
        /// </summary>
        /// <param name="fileid">文件ID</param>
        /// <returns>文件数据内容实体</returns>
        internal EapFile DownloadFile(string fileid)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().DownloadFile(fileid));
            }

            return(null);
        }
Beispiel #20
0
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        internal string UpdatePwd(EapUser user)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().UpdatePwd(user));
            }

            return(string.Empty);
        }
Beispiel #21
0
        /// <summary>
        /// 从数据库获取应用文件清单
        /// </summary>
        /// <param name="query">查询条件实体</param>
        /// <param name="pageno">要查询的页</param>
        /// <param name="pagesize">页大小</param>
        /// <param name="icnt">结果记录条数</param>
        /// <returns>应用文件清单</returns>
        internal List <EapFile> GetAppFiles(EapFile query, int pageno, int pagesize, out int icnt)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().GetAppFiles(query, pageno, pagesize, out icnt));
            }

            icnt = 0;
            return(null);
        }
Beispiel #22
0
        /// <summary>
        /// 查询值列表数据
        /// </summary>
        /// <param name="query_entity">查询条件实体</param>
        /// <param name="pageno">要查询的页</param>
        /// <param name="pagesize">页大小</param>
        /// <param name="icnt">结果记录条数</param>
        /// <returns>值列表数据清单</returns>
        internal List <EapValueList> QueryValueList(EapValueList query_entity, int pno, int psize, out int icnt)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().QueryValueList(query_entity, pno, psize, out icnt));
            }

            icnt = 0;
            return(null);
        }
Beispiel #23
0
        /// <summary>
        /// 查询系统参数数据
        /// </summary>
        /// <param name="query_entity">查询条件实体</param>
        /// <param name="pageno">要查询的页</param>
        /// <param name="pagesize">页大小</param>
        /// <param name="icnt">结果记录条数</param>
        /// <returns>值列表数据清单</returns>
        internal List <EapParameter> QuerySystemParameter(EapParameter query_entity, int pno, int psize, out int icnt)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                return(DalOracle.GetDalOracle().QuerySystemParameter(query_entity, pno, psize, out icnt));
            }

            icnt = 0;
            return(null);
        }
Beispiel #24
0
        /// <summary>
        /// 获取用户信息列表
        /// </summary>
        /// <param name="username">查询条件</param>
        /// <param name="pageno"></param>
        /// <param name="pagesize"></param>
        /// <param name="icnt"></param>
        /// <returns></returns>
        internal List <EapUser> GetUserList(EapUser user, int pageno, int pagesize, out int icnt)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                if (string.IsNullOrEmpty(user.USER_NAME))
                {
                    user.USER_NAME = "-1";
                }
                if (string.IsNullOrEmpty(user.USER_ID))
                {
                    user.USER_ID = "-1";
                }

                return(DalOracle.GetDalOracle().GetUserList(user, pageno, pagesize, out icnt));
            }

            icnt = 0;
            return(null);
        }
Beispiel #25
0
        /// <summary>
        /// 删除菜单数据
        /// </summary>
        /// <param name="menu_id">删除条件,菜单编码</param>
        /// <returns>错误消息,为空表示成功</returns>
        internal string DelMenuByMenuId(string menu_id)
        {
            if (Config.GetConfig().DB_TYPE == "1")
            {
                //1.判断除admin外是否已经
                List <EapUserMenuRight> list = DalOracle.GetDalOracle().GetNotInAdminMenuRight(menu_id);
                if (list == null)
                {
                    return("获取拥有该菜单权限的用户失败");
                }
                if (list.Count == 0)
                {
                    string ret = Oracle.GetOracle().BeginTran();
                    if (ret != string.Empty)
                    {
                        return(ret);
                    }

                    ret = DalOracle.GetDalOracle().DeleteAdminMenuRight(menu_id);
                    if (ret != string.Empty)
                    {
                        Oracle.GetOracle().Rollback();
                        return(ret);
                    }

                    ret = DalOracle.GetDalOracle().DelMenuByMenuId(menu_id);
                    if (ret != string.Empty)
                    {
                        Oracle.GetOracle().Rollback();
                        return(ret);
                    }

                    Oracle.GetOracle().Commit();

                    return(string.Empty);
                }

                return("功能菜单编码[" + menu_id + "]已经分配权限,无法删除");
            }
            return(string.Empty);
        }
Beispiel #26
0
 /// <summary>
 /// 新增部门
 /// </summary>
 /// <param name="entity">数据集</param>
 /// <returns></returns>
 internal string AddDEPARTMENT(EapDepartment entity)
 {
     return(DalOracle.GetDalOracle().AddDEPARTMENT(entity));
 }
Beispiel #27
0
 /// <summary>
 /// 根据用户获取生产线权限
 /// </summary>
 /// <param name="user">用户ID</param>
 /// <returns>按钮权限集合</returns>
 internal List <EapUserTrimLine> GetLineAuthoritybyUser(string user_id)
 {
     return(DalOracle.GetDalOracle().GetLineAuthoritybyUser(user_id));
 }
Beispiel #28
0
 /// <summary>
 /// 删除部门
 /// </summary>
 /// <param name="entity">数据集</param>
 /// <returns></returns>
 internal string DeleteDEPARTMENT(string DEPARTMENT_ID)
 {
     return(DalOracle.GetDalOracle().DeleteDEPARTMENT(DEPARTMENT_ID));
 }
Beispiel #29
0
 /// <summary>
 /// 判断部门是否重复
 /// </summary>
 /// <param name="entity">数据集</param>
 /// <returns></returns>
 internal bool RepeatDEPARTMENT(string DEPARTMENT_NAME, decimal DEPARTMENT_ID)
 {
     return(DalOracle.GetDalOracle().RepeatDEPARTMENT(DEPARTMENT_NAME, DEPARTMENT_ID));
 }
Beispiel #30
0
 /// <summary>
 /// 计算部门id
 /// </summary>
 /// <param name="entity">数据集</param>
 /// <returns></returns>
 internal decimal GetDEPARTMENT_ID()
 {
     return(DalOracle.GetDalOracle().GetDEPARTMENT_ID());
 }