Пример #1
0
        //------------------------------------------------------------------------------
        public virtual void DelOfferLocationByUuid()
        {
            string _uuid = (string)util.GetParamValue(_context, "uuid");

            ResponseOfferLocationBool wrapper = new ResponseOfferLocationBool();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "offer-location/del/by-uuid";

            bool completed = api.DelOfferLocationByUuid(

                _uuid
            );

            // get data
            wrapper.data = completed;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }
Пример #2
0
        //------------------------------------------------------------------------------
        public virtual void SetOfferLocationByUuid()
        {
            ResponseOfferLocationBool wrapper = new ResponseOfferLocationBool();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "offer-location/set/by-uuid";

            OfferLocation obj = new OfferLocation();

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

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

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

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

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

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

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

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

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

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

            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;

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

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

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

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

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

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

            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 _dob = util.GetParamValue(_context, "dob");
            if(!String.IsNullOrEmpty(_dob))
                obj.dob = Convert.ToDateTime(_dob);
            else
                obj.dob = DateTime.Now;

            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 _longitude = util.GetParamValue(_context, "longitude");
            if(!String.IsNullOrEmpty(_longitude))
                obj.longitude = Convert.ToDouble(_longitude);

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

            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 _latitude = util.GetParamValue(_context, "latitude");
            if(!String.IsNullOrEmpty(_latitude))
                obj.latitude = Convert.ToDouble(_latitude);

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

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

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

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

            util.SerializeTypeJSONToResponse(_context, wrapper);
        }