Exemplo n.º 1
0
        //------------------------------------------------------------------------------
        public virtual void BrowseRewardCompetitionListByFilter()
        {
            ResponseRewardCompetitionList wrapper = new ResponseRewardCompetitionList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "reward-competition/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");

            RewardCompetitionResult result = api.BrowseRewardCompetitionListByFilter(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);
        }
Exemplo n.º 2
0
        //------------------------------------------------------------------------------
        public virtual void GetRewardCompetitionListByChannelIdByPath()
        {
            string _channel_id = (string)util.GetParamValue(_context, "channel_id");
            string _path = (string)util.GetParamValue(_context, "path");

            ResponseRewardCompetitionList wrapper = new ResponseRewardCompetitionList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "reward-competition/get/by-channel-id/by-path";

            List<RewardCompetition> objs = api.GetRewardCompetitionListByChannelIdByPath(
                _channel_id
                , _path
            );

            // get data
            wrapper.data = objs;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }
Exemplo n.º 3
0
        //------------------------------------------------------------------------------
        public virtual void GetRewardCompetitionListByUuid()
        {
            string _uuid = (string)util.GetParamValue(_context, "uuid");

            ResponseRewardCompetitionList wrapper = new ResponseRewardCompetitionList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "reward-competition/get/by-uuid";

            List<RewardCompetition> objs = api.GetRewardCompetitionListByUuid(
                _uuid
            );

            // get data
            wrapper.data = objs;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }
Exemplo n.º 4
0
        //------------------------------------------------------------------------------
        public virtual void GetRewardCompetitionListByChannelIdByCompleted()
        {
            string _channel_id = (string)util.GetParamValue(_context, "channel_id");
            bool _completed = Convert.ToBoolean(util.GetParamValue(_context, "completed"));

            ResponseRewardCompetitionList wrapper = new ResponseRewardCompetitionList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "reward-competition/get/by-channel-id/by-completed";

            List<RewardCompetition> objs = api.GetRewardCompetitionListByChannelIdByCompleted(
                _channel_id
                , _completed
            );

            // get data
            wrapper.data = objs;

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