Beispiel #1
0
        //------------------------------------------------------------------------------
        public virtual void BrowseGameAttributeListByFilter()
        {
            ResponseGameAttributeList wrapper = new ResponseGameAttributeList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game-attribute/browse/by-filter";

            SearchFilter obj = new SearchFilter();
            obj.page = Convert.ToInt32(util.GetParamValue(_context, "page"));
            obj.page_size = Convert.ToInt32(util.GetParamValue(_context, "page-size"));
            obj.filter = util.GetParamValue(_context, "filter");

            GameAttributeResult result = api.BrowseGameAttributeListByFilter(obj);
            wrapper.info.Add("total_rows", result.total_rows);
            wrapper.info.Add("total_pages", result.total_pages);
            wrapper.info.Add("page", result.page);
            wrapper.info.Add("page_size", result.page_size);

            // get data
            wrapper.data = result.data;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }
Beispiel #2
0
        //------------------------------------------------------------------------------
        public virtual void GetGameAttributeListByUuid()
        {
            string _uuid = (string)util.GetParamValue(_context, "uuid");

            ResponseGameAttributeList wrapper = new ResponseGameAttributeList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game-attribute/get/by-uuid";

            List<GameAttribute> objs = api.GetGameAttributeListByUuid(
                _uuid
            );

            // get data
            wrapper.data = objs;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }
Beispiel #3
0
        //------------------------------------------------------------------------------
        public virtual void GetGameAttributeListByGameIdByCode()
        {
            string _game_id = (string)util.GetParamValue(_context, "game_id");
            string _code = (string)util.GetParamValue(_context, "code");

            ResponseGameAttributeList wrapper = new ResponseGameAttributeList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game-attribute/get/by-game-id/by-code";

            List<GameAttribute> objs = api.GetGameAttributeListByGameIdByCode(
                _game_id
                , _code
            );

            // get data
            wrapper.data = objs;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }
Beispiel #4
0
        //------------------------------------------------------------------------------
        public virtual void GetGameAttributeListByType()
        {
            int _type = int.Parse(util.GetParamValue(_context, "type"));

            ResponseGameAttributeList wrapper = new ResponseGameAttributeList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game-attribute/get/by-type";

            List<GameAttribute> objs = api.GetGameAttributeListByType(
                _type
            );

            // get data
            wrapper.data = objs;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }
Beispiel #5
0
        //------------------------------------------------------------------------------
        public virtual void GetGameAttributeList()
        {
            ResponseGameAttributeList wrapper = new ResponseGameAttributeList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game-attribute/get";

            List<GameAttribute> objs = api.GetGameAttributeList(
            );

            // get data
            wrapper.data = objs;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }