Пример #1
0
 private void button10_Click(object sender, EventArgs e)
 {
     UserBLL bll = new UserBLL();
     RoleBLL rolebll = new RoleBLL();
     User_RoleDao dao = new User_RoleDao();
     var urs = dao.Query(new User_RoleQueryForm { UserID = "155f1092db4043a0b9ecd62a60ffc51d" }).ToList();
     var roleids = (from ur in urs select ur.RoleID).ToList();
     var role = rolebll.Query(new RoleQueryForm { IDs = roleids }).ToList();
     var result = rolebll.GetUserSubUserIDs("155f1092db4043a0b9ecd62a60ffc51d");
 }
Пример #2
0
 public override bool OnActionExecuting(ActionContext context)
 {
     RoleBLL rolebll = new RoleBLL();
     UserBLL userbll = new UserBLL();
     string userid = userbll.GetCurrentUser().User.ID;
     var list = rolebll.GetUserSubUserIDs(userid);
     //MonitorCache.GetInstance().PushMessage(new CacheMessage { Message = "id:"+ userid + " count:" + list.Count.ToString() }, SOAFramework.Library.CacheEnum.FormMonitor);
     context.Parameters[Common.DataAuthorityKey] = list;
     return true;
 }