예제 #1
0
        public int CreateUser(string name)
        {
            string uri    = this.Request.RequestUri.ToString();
            int    userId = BusinessWebApi.GetInstance().CreateNewUser(name);

            return(userId);
        }
        public string MakeBetByNumber(BetByNumberViewModel bet)
        {
            string result = string.Empty;
            bool   res    = BusinessWebApi.GetInstance().MakeBetByNumber(bet);

            if (res)
            {
                result = "SUCCESS";
            }
            else
            {
                result = "NON SUCCESS";
            }

            return(result);
        }
        public string OpenRoulette(int rouletteId)
        {
            string result = string.Empty;
            bool   res    = BusinessWebApi.GetInstance().OpenRoulette(rouletteId);

            if (res)
            {
                result = "SUCCESS";
            }
            else
            {
                result = "NON SUCCESS";
            }

            return(result);
        }
        public int Get()
        {
            int rouletteId = BusinessWebApi.GetInstance().CreateNewRoulette();

            return(rouletteId);
        }
예제 #5
0
        public RouletteDto Get(int rouletteId)
        {
            RouletteDto roulette = BusinessWebApi.GetInstance().GetRoulette(rouletteId);

            return(roulette);
        }
예제 #6
0
        public IEnumerable <RouletteDto> Get()
        {
            RouletteDto[] roulettes = BusinessWebApi.GetInstance().GetRoulettes();

            return(roulettes);
        }
        public UserDto Get(int userId)
        {
            UserDto user = BusinessWebApi.GetInstance().GetUser(userId);

            return(user);
        }
        public IEnumerable <UserDto> Get()
        {
            UserDto[] users = BusinessWebApi.GetInstance().GetUsers();

            return(users);
        }
예제 #9
0
        public IEnumerable <BetDto> CloseRoulette(int rouletteId)
        {
            BusinessWebApi.GetInstance().CloseRoulette(rouletteId, out IEnumerable <BetDto> betDtos);

            return(betDtos);
        }