using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using YX.DAL; using YX.Entity; namespace YX.BLL { public class SystemRole_Bll { SystemRole_Dal role_dal = new SystemRole_Dal(); /// /// 获取所有角色 /// /// public List GetRoles() { try { return role_dal.GetRoles(); } catch (Exception ex) { throw ex; } } /// /// 通过角色ID 获取角色 /// /// /// public List GetRoleByRoleId(string Roles_ID) { try { return role_dal.GetRoleByRoleId(Roles_ID); } catch (Exception) { throw; } } /// /// 获取角色节点 /// /// public DataTable GetRoleParentId() { DataTable dt = new DataTable(); try { return role_dal.GetRoleParentId(); } catch (Exception ex) { throw ex; } } public List GetUserRoleByUserID(string UserID) { try { return role_dal.GetUserRoleByUserID(UserID); } catch (Exception ex) { throw ex; } } public int AddRoles(Base_Roles info) { try { return role_dal.AddRoles(info); } catch (Exception ex) { throw ex; } } public int UpdateRoles(Base_Roles info) { try { return role_dal.UpdateRoles(info); } catch (Exception ex) { throw ex; } } public int DeleteRole(string RoleID) { try { return role_dal.DeleteRole(RoleID); } catch (Exception ex) { throw ex; } } } }