/// <summary> /// 根据角色及当前登录管理可修改角色获取所有制定部门下的角色 /// </summary> /// <param name="p">部门id</param> /// <param name="ids">当前登录管理可管理角色的集合</param> /// <returns></returns> public static IList <DeptRoleModel> GetDeptRoles(int p, string ids) { if (ids == "") { return(null); } return(DeptRoleDAL.GetRoleDeptByComDept(p, ids)); }
/// <summary> /// DS2012 /// 获取权限菜单,并生成权限树 /// </summary> /// <param name="roleid"></param> /// <param name="number"></param> /// <param name="htb"></param> /// <returns></returns> public string ResetAllPermission(int roleid, string number, Hashtable htb) { DataTable dt = DeptRoleDAL.GetPermission(roleid); StringBuilder strb = new StringBuilder(); GetPermissionTree(dt, -100, strb, ""); strb.Append(DeptRoleDAL.GetWareHousePer(number, htb, roleid)); return(strb.ToString()); }
/// <summary> /// ds2012 /// 删除角色信息 /// </summary> /// <returns></returns> public static string DelDeptRole(HttpContext context, int roleid) { DeptRoleModel deptRole = DeptRoleDAL.GetRoleDeptByID(roleid); if (deptRole == null) { return("该角色已经删除!"); } return(DeptRoleDAL.DelDeptRole(roleid)); }
/// <summary> /// 获取角色权限树 /// </summary> /// <param name="hashtable">角色权限</param> /// <param name="isEdit">是否为修改 true 为修改</param> /// <returns></returns> public static string GetRPTree(Hashtable hashtable, bool isAdd, string number) { if (isAdd) { return(DeptRoleDAL.GetRPTree(hashtable, number)); } else { return(""); } }
/// <summary> /// 管理员 /// </summary> /// <param name="number">管理员编号</param> /// <returns></returns> public static IList <DeptRoleModel> GetDeptRoles(string number, PaginationModel pageInfo) { string topManageId = BLL.CommonClass.CommonDataBLL.GetTopManageID(1); if (number.ToString() == topManageId) { return(null); } else { return(DeptRoleDAL.GetDeptRoles(number, pageInfo)); } }
/// <summary> /// ds2012 /// 添加角色及角色权限 /// </summary> /// <param name="context">用来获取当前登录用户权限</param> /// <param name="deptRole">角色信息</param> /// <returns></returns> public static bool AddDeptRole(DeptRoleModel deptRole) { string ids = ""; IDictionaryEnumerator ideor = deptRole.htbPerssion.GetEnumerator(); while (ideor.MoveNext()) { ids = ids + ideor.Key.ToString() + ","; } try { DeptRoleDAL.AddDeptRole(ids, deptRole); } catch (FormatException) { return(false); } return(true); }
/// <summary> /// 获取所有角色信息 /// </summary> /// <returns></returns> public static IList <DeptRoleModel> GetDeptRole(PaginationModel pageInfo) { return(DeptRoleDAL.GetDeptRoles(pageInfo)); }
/// <summary> /// ds2012 /// 验证当前登录管理员是否有分配权限的权利 /// </summary> /// <param name="number"></param> /// <returns></returns> public static bool CheckAllot(string number) { return(DeptRoleDAL.GetAllot(number)); }
/// <summary> /// 获取该当前登录管理员可以查看的网络团队 /// </summary> /// <param name="number">当前管理员编号</param> /// <returns></returns> public static int GetViewManage(string manageID) { return(DeptRoleDAL.GetViewManage(manageID)); }
/// <summary> /// 分页获取角色数据 /// </summary> /// <param name="pageInfo">分页帮助类</param> /// <param name="tableName">表名</param> /// <param name="columns">列名</param> /// <param name="key">分页列名</param> /// <param name="condition">条件</param> /// <returns></returns> public static System.Data.DataTable GetDeptRoleDataTable(PaginationModel pageInfo, string tableName, string columns, string key, string condition) { return(DeptRoleDAL.GetDeptRolesDataTable(pageInfo, tableName, columns, key, condition)); }
/// <summary> /// 根据部门编号获取角色信息 /// </summary> /// <param name="p"></param> /// <returns></returns> public static IList <DeptRoleModel> GetDeptRoles(int p) { return(DeptRoleDAL.GetRoleDeptByComDept(p)); }
/// <summary> /// 根据角色编号获取该角色下的管理员人数 /// </summary> /// <param name="p">角色编号</param> public static int GetCountByRoleId(int p) { return(DeptRoleDAL.GetCountByRoleId(p)); }
/// <summary> /// 根据角色编号获取角色权限信息 /// </summary> /// <param name="p"></param> /// <returns></returns> public static Hashtable GetAllPermission(int p) { return(DeptRoleDAL.GetAllPermission(p)); }
/// <summary> /// ds2012 /// 获取指定角色信息 /// </summary> /// <param name="roleID">角色编号</param> /// <returns></returns> public static DeptRoleModel GetDeptRoleByRoleID(int roleID) { return(DeptRoleDAL.GetRoleDeptByID(roleID)); }
/// <summary> /// ds2012 /// 获取指定管理员的所有权限 /// </summary> /// <param name="manageId">指定管理员的编号</param> /// <returns></returns> public static Hashtable GetAllPermission(string manageId) { return(DeptRoleDAL.GetAllPermission(manageId)); }
/// <summary> /// DS2012 /// 获取该当前登录管理员所有可以修改的角色编号 /// </summary> /// <param name="number">当前管理员编号</param> /// <returns></returns> public static string GetDeptRoleIDs(string number) { return(DeptRoleDAL.GetDeptRoleIds(number)); }
/// <summary> /// 添加物流公司管理员 /// </summary> /// <param name="manage">管理员信息</param> /// <param name="eCompanyPer">物流公司仓库权限</param> /// <param name="roleId">角色编号</param> /// <returns></returns> public static bool AddLogisticsManage(ManageModel manage, int[] eCompanyPer, int roleId) { DeptRoleDAL deptRoleServer = new DeptRoleDAL(); return(false); }
/// <summary> /// 判断角色名是否重复 /// </summary> /// <param name="deptRoleID">角色ID</param> /// <param name="deptRoleName"></param> /// <returns></returns> public static DeptRoleModel CheckDeptRoleName(string deptRoleName, int deptRoleID) { return(DeptRoleDAL.GetDeptRole(deptRoleName, deptRoleID)); }