Example #1
0
        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));
        }
Example #2
0
        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();
        }
Example #3
0
        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));
        }