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

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

            List<ProfileReward> objs = api.GetProfileRewardListByUuid(
                _uuid
            );

            // get data
            wrapper.data = objs;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }
Example #2
0
        //------------------------------------------------------------------------------
        public virtual void BrowseProfileRewardListByFilter()
        {
            ResponseProfileRewardList wrapper = new ResponseProfileRewardList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "profile-reward/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");

            ProfileRewardResult result = api.BrowseProfileRewardListByFilter(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 GetProfileRewardListByProfileIdByChannelIdByRewardId()
        {
            string _profile_id = (string)util.GetParamValue(_context, "profile_id");
            string _channel_id = (string)util.GetParamValue(_context, "channel_id");
            string _reward_id = (string)util.GetParamValue(_context, "reward_id");

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

            List<ProfileReward> objs = api.GetProfileRewardListByProfileIdByChannelIdByRewardId(
                _profile_id
                , _channel_id
                , _reward_id
            );

            // get data
            wrapper.data = objs;

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