public bool AddRoleModel(UserRole role) { SysRoleModel roleModel = bllRole.GetModel(role.RoleName); if (roleModel != null) { bllRole.Delete(role.RoleName); } roleModel = new SysRoleModel(); roleModel.SysRole_Name = role.RoleName; roleModel.SysRole_Desc = role.RoleDesc; roleModel.SysRole_Level = role.RoleLevel; roleModel.SysRole_Remark = role.RoleRemark; return(bllRole.Add(roleModel)); }
public bool CheckLoginUser(User user, ref int roleLevel) { SysUserModel model = bllUser.GetModel(user.UserName); if (model == null) { return(false); } SysRoleModel role = bllRole.GetModel(model.SysRole_Name); if (role == null) { return(false); } roleLevel = role.SysRole_Level; return(true); }