public IActionResult GetRoleMenuMember(int roleid) { Tright_Power_Menu_Da da = new Tright_Power_Menu_Da(); var list = da.ListByRoleid(roleid); return(SuccessResultList(list)); }
public IActionResult DeletedRoleMenuMebmer(int menuid, int roleid) { Tright_Role_Power_Da da = new Tright_Role_Power_Da(); var rp = da.Select.Where(s => s.Role_Id == roleid).ToOne(); Tright_Power_Menu_Da poda = new Tright_Power_Menu_Da(); if (poda.Delete(s => s.Menu_Id == menuid && s.Power_Id == rp.Power_Id) > 0) { return(SuccessMessage("已删除!")); } return(FailMessage("删除失败")); }
public IActionResult AddRoleMenuMebmer(int menuid, int roleid) { Tright_Role_Power_Da da = new Tright_Role_Power_Da(); var rp = da.Select.Where(s => s.Role_Id == roleid).ToOne(); Tright_Power_Menu_Da poda = new Tright_Power_Menu_Da(); Tright_Power_Menu model = new Tright_Power_Menu(); model.Power_Id = rp.Power_Id; model.Menu_Id = menuid; poda.InsertOrUpdate(model); return(SuccessMessage("已添加!")); }