public string ResetRoleAction(string roles, string actions) { if (this._.设置角色权限.Permit == 0) { return("您没有进行设置角色权限的权限!"); } string Result = string.Empty; List <SspRoleAction> lst = new List <SspRoleAction>(); string[] roleList = roles.Split('|'); string[] actionList = actions.Split('|'); foreach (string role in roleList) { if (string.IsNullOrWhiteSpace(role)) { continue; } sysRoleActionManager.Delete(new SspRoleAction() { RoleId = Convert.ToInt32(role) }); foreach (string action in actionList) { if (string.IsNullOrWhiteSpace(action)) { continue; } int irole = 0; if (!int.TryParse(role, out irole)) { continue; } int iaction = 0; if (!int.TryParse(action, out iaction)) { continue; } SspRoleAction m = new SspRoleAction(); m.RoleId = irole; m.ActionId = iaction; lst.Add(m); } } sysRoleActionManager.BatchInsert(lst); return(Result); }
public IList <SspRoleAction> GetEntityList(SspRoleAction entity) { return(this.basicService.GetEntityList(entity)); }
public int Delete(SspRoleAction entity) { return(this.basicService.Delete(entity)); }