Exemple #1
0
        //------------------------------------------------------------------------------
        public virtual void SetProfileByUuid()
        {
            ResponseProfileBool wrapper = new ResponseProfileBool();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "profile/set/by-uuid";

            Profile obj = new Profile();

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

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

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

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

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

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

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

            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 _email = util.GetParamValue(_context, "email");
            if(!String.IsNullOrEmpty(_email))
                obj.email = (string)_email;

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

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

            util.SerializeTypeJSONToResponse(_context, wrapper);
        }
Exemple #2
0
        //------------------------------------------------------------------------------
        public virtual void DelProfileByUuid()
        {
            string _uuid = (string)util.GetParamValue(_context, "uuid");

            ResponseProfileBool wrapper = new ResponseProfileBool();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "profile/del/by-uuid";

            bool completed = api.DelProfileByUuid(

                _uuid
            );

            // get data
            wrapper.data = completed;

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