Example #1
0
        //------------------------------------------------------------------------------
        public virtual void GetGameKeyMetaListByUuid()
        {
            string _uuid = (string)util.GetParamValue(_context, "uuid");

            ResponseGameKeyMetaList wrapper = new ResponseGameKeyMetaList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game-key-meta/get/by-uuid";

            List<GameKeyMeta> objs = api.GetGameKeyMetaListByUuid(
                _uuid
            );

            // get data
            wrapper.data = objs;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }
Example #2
0
        //------------------------------------------------------------------------------
        public virtual void BrowseGameKeyMetaListByFilter()
        {
            ResponseGameKeyMetaList wrapper = new ResponseGameKeyMetaList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game-key-meta/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");

            GameKeyMetaResult result = api.BrowseGameKeyMetaListByFilter(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);
        }
Example #3
0
        //------------------------------------------------------------------------------
        public virtual void GetGameKeyMetaListByCodeByLevel()
        {
            string _code = (string)util.GetParamValue(_context, "code");
            string _level = (string)util.GetParamValue(_context, "level");

            ResponseGameKeyMetaList wrapper = new ResponseGameKeyMetaList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game-key-meta/get/by-code/by-level";

            List<GameKeyMeta> objs = api.GetGameKeyMetaListByCodeByLevel(
                _code
                , _level
            );

            // get data
            wrapper.data = objs;

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