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

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

            bool completed = api.DelRewardCompetitionByUuid(

                _uuid
            );

            // get data
            wrapper.data = completed;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }
Example #2
0
        //------------------------------------------------------------------------------
        public virtual void SetRewardCompetitionByUuid()
        {
            ResponseRewardCompetitionBool wrapper = new ResponseRewardCompetitionBool();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "reward-competition/set/by-uuid";

            RewardCompetition obj = new RewardCompetition();

            string _sort = util.GetParamValue(_context, "sort");
            if(!String.IsNullOrEmpty(_sort))
                obj.sort = Convert.ToInt32(_sort);

            string _code = util.GetParamValue(_context, "code");
            if(!String.IsNullOrEmpty(_code))
                obj.code = (string)_code;

            string _date_end = util.GetParamValue(_context, "date_end");
            if(!String.IsNullOrEmpty(_date_end))
                obj.date_end = Convert.ToDateTime(_date_end);
            else
                obj.date_end = DateTime.Now;

            string _results = util.GetParamValue(_context, "results");
            if(!String.IsNullOrEmpty(_results))
                obj.results = (string)_results;

            string _visible = util.GetParamValue(_context, "visible");
            if(!String.IsNullOrEmpty(_visible))
                obj.visible = Convert.ToBoolean(_visible);

            string _display_name = util.GetParamValue(_context, "display_name");
            if(!String.IsNullOrEmpty(_display_name))
                obj.display_name = (string)_display_name;

            string _uuid = util.GetParamValue(_context, "uuid");
            if(!String.IsNullOrEmpty(_uuid))
                obj.uuid = (string)_uuid;

            string _date_start = util.GetParamValue(_context, "date_start");
            if(!String.IsNullOrEmpty(_date_start))
                obj.date_start = Convert.ToDateTime(_date_start);
            else
                obj.date_start = DateTime.Now;

            string _winners = util.GetParamValue(_context, "winners");
            if(!String.IsNullOrEmpty(_winners))
                obj.winners = (string)_winners;

            string _template = util.GetParamValue(_context, "template");
            if(!String.IsNullOrEmpty(_template))
                obj.template = (string)_template;

            string _type = util.GetParamValue(_context, "type");
            if(!String.IsNullOrEmpty(_type))
                obj.type = (string)_type;

            string _trigger_data = util.GetParamValue(_context, "trigger_data");
            if(!String.IsNullOrEmpty(_trigger_data))
                obj.trigger_data = (string)_trigger_data;

            string _status = util.GetParamValue(_context, "status");
            if(!String.IsNullOrEmpty(_status))
                obj.status = (string)_status;

            string _description = util.GetParamValue(_context, "description");
            if(!String.IsNullOrEmpty(_description))
                obj.description = (string)_description;

            string _completed = util.GetParamValue(_context, "completed");
            if(!String.IsNullOrEmpty(_completed))
                obj.completed = Convert.ToBoolean(_completed);

            string _template_url = util.GetParamValue(_context, "template_url");
            if(!String.IsNullOrEmpty(_template_url))
                obj.template_url = (string)_template_url;

            string _active = util.GetParamValue(_context, "active");
            if(!String.IsNullOrEmpty(_active))
                obj.active = Convert.ToBoolean(_active);

            string _path = util.GetParamValue(_context, "path");
            if(!String.IsNullOrEmpty(_path))
                obj.path = (string)_path;

            string _data = util.GetParamValue(_context, "data");
            if(!String.IsNullOrEmpty(_data))
                obj.data = (string)_data;

            string _name = util.GetParamValue(_context, "name");
            if(!String.IsNullOrEmpty(_name))
                obj.name = (string)_name;

            string _date_modified = util.GetParamValue(_context, "date_modified");
            if(!String.IsNullOrEmpty(_date_modified))
                obj.date_modified = Convert.ToDateTime(_date_modified);
            else
                obj.date_modified = DateTime.Now;

            string _fulfilled = util.GetParamValue(_context, "fulfilled");
            if(!String.IsNullOrEmpty(_fulfilled))
                obj.fulfilled = Convert.ToBoolean(_fulfilled);

            string _channel_id = util.GetParamValue(_context, "channel_id");
            if(!String.IsNullOrEmpty(_channel_id))
                obj.channel_id = (string)_channel_id;

            string _date_created = util.GetParamValue(_context, "date_created");
            if(!String.IsNullOrEmpty(_date_created))
                obj.date_created = Convert.ToDateTime(_date_created);
            else
                obj.date_created = DateTime.Now;

            // get data
            wrapper.data = api.SetRewardCompetitionByUuid(obj);

            util.SerializeTypeJSONToResponse(_context, wrapper);
        }
Example #3
0
        //------------------------------------------------------------------------------
        public virtual void DelRewardCompetitionByPathByChannelId()
        {
            string _path = (string)util.GetParamValue(_context, "path");
            string _channel_id = (string)util.GetParamValue(_context, "channel_id");

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

            bool completed = api.DelRewardCompetitionByPathByChannelId(

                _path
                , _channel_id
            );

            // get data
            wrapper.data = completed;

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