public Result <List <Base> > List4Filter() { UserRoleEnum role = (UserRoleEnum)int.Parse(UserRA.Get(user_id.ToString(), "role")); List <Base> lst = UnitDA.List <Base>(role == UserRoleEnum.Administrator ? 0 : user_id); return(Result(lst)); }
public static void Open() { HQService.SubscribeStart(); var accounts = AccountDA.List <Account>(); foreach (Account account in accounts) { LoadAccount(account); } var units = UnitDA.List <Unit>(); foreach (Unit unit in units) { LoadUnit(unit); } var positions = PositionDA.List(); foreach (Position position in positions) { LoadPosition(position); } var items = AccountGroupDA.ListItems(); foreach (AccountGroupItem item in items) { LoadAccountGroupItem(item); } HQService.Get(positions.Select(p => p.code)); TradeBiz.Start(); }
public Result <List <Model.DB.Unit> > List() { UserRoleEnum role = (UserRoleEnum)int.Parse(UserRA.Get(user_id.ToString(), "role")); List <Model.DB.Unit> lst = UnitDA.List <Model.DB.Unit>(role == UserRoleEnum.Administrator ? 0 : user_id); return(Result(lst)); }