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; }
public bool TaskHouse(House house) { if (house == null) throw new Exception("house不能为null"); if (string.IsNullOrEmpty(house.ID)) throw new Exception("house.id不能为空"); UserBLL userbll = new UserBLL(); string userid = userbll.GetCurrentUser()?.User?.ID; return housebll.Update(new House { ID = house.ID, OwnerID = userid, RentFee = house.RentFee, RentDateStart = house.RentDateStart, RentDateEnd = house.RentDateEnd, ContractCode = house.ContractCode, RentRemark = house.RentRemark, }); }
public int GenerateBill() { UserBLL userbll = new UserBLL(); return bll.GenerateBill(userbll.GetCurrentUser()?.User?.ID); }