Esempio n. 1
0
        public List <GameProfileContent> GetList(List <Dictionary <string, object> > dictList)
        {
            data.Clear();

            foreach (Dictionary <string, object> dict in dictList)
            {
                foreach (KeyValuePair <string, object> obj in dict)
                {
                    GameProfileContent objectValue = (GameProfileContent)obj.Value;
                    objectValue.FillFromDictionary(dict);
                    data.Add(objectValue);
                }
            }

            return(data);
        }
Esempio n. 2
0
 //------------------------------------------------------------------------------
 public virtual bool SetGameProfileContentByUuid(string set_type, GameProfileContent obj)
 {
     return act.SetGameProfileContentByUuid(set_type, obj);
 }
Esempio n. 3
0
 public virtual bool SetGameProfileContentByGameIdByUsernameByPathByVersionByPlatformByIncrement(GameProfileContent obj)
 {
     return act.SetGameProfileContentByGameIdByUsernameByPathByVersionByPlatformByIncrement(DEFAULT_SET_TYPE, obj);
 }
Esempio n. 4
0
 public virtual bool SetGameProfileContentByGameIdByUsernameByPathByVersionByPlatformByIncrement(SetType set_type, GameProfileContent obj)
 {
     return act.SetGameProfileContentByGameIdByUsernameByPathByVersionByPlatformByIncrement(ConvertSetTypeToString(set_type), obj);
 }
Esempio n. 5
0
 //------------------------------------------------------------------------------
 public virtual bool SetGameProfileContentByGameIdByUsernameByPathByVersionByPlatformByIncrement(string set_type, GameProfileContent obj)
 {
     return act.SetGameProfileContentByGameIdByUsernameByPathByVersionByPlatformByIncrement(set_type, obj);
 }
Esempio n. 6
0
 public virtual bool SetGameProfileContentByGameIdByUsernameByPath(GameProfileContent obj)
 {
     return act.SetGameProfileContentByGameIdByUsernameByPath(DEFAULT_SET_TYPE, obj);
 }
Esempio n. 7
0
 public virtual bool SetGameProfileContentByGameIdByUsernameByPath(SetType set_type, GameProfileContent obj)
 {
     return act.SetGameProfileContentByGameIdByUsernameByPath(ConvertSetTypeToString(set_type), obj);
 }
Esempio n. 8
0
 public virtual bool SetGameProfileContentByGameIdByProfileIdByPath(string set_type, GameProfileContent obj)
 {
     return data.SetGameProfileContentByGameIdByProfileIdByPath(set_type, obj);
 }
Esempio n. 9
0
 public virtual bool SetGameProfileContentByGameIdByProfileIdByPathByVersion(GameProfileContent obj)
 {
     return act.SetGameProfileContentByGameIdByProfileIdByPathByVersion(DEFAULT_SET_TYPE, obj);
 }
Esempio n. 10
0
 //------------------------------------------------------------------------------
 public virtual bool SetGameProfileContentByGameIdByProfileIdByPathByVersion(string set_type, GameProfileContent obj)
 {
     return act.SetGameProfileContentByGameIdByProfileIdByPathByVersion(set_type, obj);
 }
Esempio n. 11
0
        //------------------------------------------------------------------------------
        public virtual bool SetGameProfileContentByUuid(string set_type, GameProfileContent obj)
        {
            List<SqlParameter> parameters
                = new List<SqlParameter>();
            parameters.Add(new SqlParameter("@set_type", set_type));
            parameters.Add(new SqlParameter("@username", obj.username));
            parameters.Add(new SqlParameter("@code", obj.code));
            parameters.Add(new SqlParameter("@profile_id", obj.profile_id));
            parameters.Add(new SqlParameter("@increment", obj.increment));
            parameters.Add(new SqlParameter("@path", obj.path));
            parameters.Add(new SqlParameter("@display_name", obj.display_name));
            parameters.Add(new SqlParameter("@uuid", obj.uuid));
            parameters.Add(new SqlParameter("@platform", obj.platform));
            parameters.Add(new SqlParameter("@filename", obj.filename));
            parameters.Add(new SqlParameter("@source", obj.source));
            parameters.Add(new SqlParameter("@version", obj.version));
            parameters.Add(new SqlParameter("@game_network", obj.game_network));
            parameters.Add(new SqlParameter("@type", obj.type));
            parameters.Add(new SqlParameter("@status", obj.status));
            parameters.Add(new SqlParameter("@hash", obj.hash));
            parameters.Add(new SqlParameter("@description", obj.description));
            parameters.Add(new SqlParameter("@content_type", obj.content_type));
            parameters.Add(new SqlParameter("@active", obj.active));
            parameters.Add(new SqlParameter("@game_id", obj.game_id));
            parameters.Add(new SqlParameter("@data", obj.data));
            parameters.Add(new SqlParameter("@name", obj.name));
            parameters.Add(new SqlParameter("@extension", obj.extension));
            parameters.Add(new SqlParameter("@date_modified", obj.date_modified));
            parameters.Add(new SqlParameter("@date_created", obj.date_created));

            try {
                return (bool)data.ExecuteScalar(
                BaseGamingData.connectionString
                , CommandType.StoredProcedure
                , "usp_game_profile_content_set_by_uuid"
                , parameters
                );
            }
            catch (Exception e){
                log.Error(e);
                return false;
            }
        }
Esempio n. 12
0
        //------------------------------------------------------------------------------
        public virtual bool SetGameProfileContentByUuid(string set_type, GameProfileContent obj)
        {
            List<NpgsqlParameter> parameters
                = new List<NpgsqlParameter>();
            parameters.Add(new NpgsqlParameter("in_set_type", set_type));
            parameters.Add(new NpgsqlParameter("in_username", obj.username));
            parameters.Add(new NpgsqlParameter("in_code", obj.code));
            parameters.Add(new NpgsqlParameter("in_profile_id", obj.profile_id));
            parameters.Add(new NpgsqlParameter("in_increment", obj.increment));
            parameters.Add(new NpgsqlParameter("in_path", obj.path));
            parameters.Add(new NpgsqlParameter("in_display_name", obj.display_name));
            parameters.Add(new NpgsqlParameter("in_uuid", obj.uuid));
            parameters.Add(new NpgsqlParameter("in_platform", obj.platform));
            parameters.Add(new NpgsqlParameter("in_filename", obj.filename));
            parameters.Add(new NpgsqlParameter("in_source", obj.source));
            parameters.Add(new NpgsqlParameter("in_version", obj.version));
            parameters.Add(new NpgsqlParameter("in_game_network", obj.game_network));
            parameters.Add(new NpgsqlParameter("in_type", obj.type));
            parameters.Add(new NpgsqlParameter("in_status", obj.status));
            parameters.Add(new NpgsqlParameter("in_hash", obj.hash));
            parameters.Add(new NpgsqlParameter("in_description", obj.description));
            parameters.Add(new NpgsqlParameter("in_content_type", obj.content_type));
            parameters.Add(new NpgsqlParameter("in_active", obj.active));
            parameters.Add(new NpgsqlParameter("in_game_id", obj.game_id));
            parameters.Add(new NpgsqlParameter("in_data", obj.data));
            parameters.Add(new NpgsqlParameter("in_name", obj.name));
            parameters.Add(new NpgsqlParameter("in_extension", obj.extension));
            parameters.Add(new NpgsqlParameter("in_date_modified", obj.date_modified));
            parameters.Add(new NpgsqlParameter("in_date_created", obj.date_created));

            try {
                return Convert.ToBoolean(data.ExecuteScalar(
                BaseGamingData.connectionString
                , CommandType.StoredProcedure
                , "usp_game_profile_content_set_uuid"
                , parameters
                ));
            }
            catch (Exception e){
                log.Error(e);
                return false;
            }
        }
Esempio n. 13
0
        public virtual GameProfileContent FillGameProfileContent(DataRow dr)
        {
            GameProfileContent obj = new GameProfileContent();

            if (dr["username"] != null)
                    obj.username = dataType.FillDataString(dr, "username");
            if (dr["code"] != null)
                    obj.code = dataType.FillDataString(dr, "code");
            if (dr["profile_id"] != null)
                    obj.profile_id = dataType.FillDataString(dr, "profile_id");
            if (dr["increment"] != null)
                    obj.increment = dataType.FillDataInt(dr, "increment");
            if (dr["path"] != null)
                    obj.path = dataType.FillDataString(dr, "path");
            if (dr["display_name"] != null)
                    obj.display_name = dataType.FillDataString(dr, "display_name");
            if (dr["uuid"] != null)
                    obj.uuid = dataType.FillDataString(dr, "uuid");
            if (dr["platform"] != null)
                    obj.platform = dataType.FillDataString(dr, "platform");
            if (dr["filename"] != null)
                    obj.filename = dataType.FillDataString(dr, "filename");
            if (dr["source"] != null)
                    obj.source = dataType.FillDataString(dr, "source");
            if (dr["version"] != null)
                    obj.version = dataType.FillDataString(dr, "version");
            if (dr["game_network"] != null)
                    obj.game_network = dataType.FillDataString(dr, "game_network");
            if (dr["type"] != null)
                    obj.type = dataType.FillDataString(dr, "type");
            if (dr["status"] != null)
                    obj.status = dataType.FillDataString(dr, "status");
            if (dr["hash"] != null)
                    obj.hash = dataType.FillDataString(dr, "hash");
            if (dr["description"] != null)
                    obj.description = dataType.FillDataString(dr, "description");
            if (dr["content_type"] != null)
                    obj.content_type = dataType.FillDataString(dr, "content_type");
            if (dr["active"] != null)
                    obj.active = dataType.FillDataBool(dr, "active");
            if (dr["game_id"] != null)
                    obj.game_id = dataType.FillDataString(dr, "game_id");
            if (dr["data"] != null)
                    obj.data = dataType.FillDataString(dr, "data");
            if (dr["name"] != null)
                    obj.name = dataType.FillDataString(dr, "name");
            if (dr["extension"] != null)
                    obj.extension = dataType.FillDataString(dr, "extension");
            if (dr["date_modified"] != null)
                    obj.date_modified = dataType.FillDataDateTime(dr, "date_modified");
            if (dr["date_created"] != null)
                    obj.date_created = dataType.FillDataDateTime(dr, "date_created");

            return obj;
        }
Esempio n. 14
0
 public virtual bool SetGameProfileContentByUsername(string set_type, GameProfileContent obj)
 {
     return data.SetGameProfileContentByUsername(set_type, obj);
 }
Esempio n. 15
0
 public virtual bool SetGameProfileContentByUuid(SetType set_type, GameProfileContent obj)
 {
     return act.SetGameProfileContentByUuid(ConvertSetTypeToString(set_type), obj);
 }
Esempio n. 16
0
 //------------------------------------------------------------------------------
 public virtual bool SetGameProfileContentByGameIdByUsernameByPath(string set_type, GameProfileContent obj)
 {
     return act.SetGameProfileContentByGameIdByUsernameByPath(set_type, obj);
 }
Esempio n. 17
0
 public virtual bool SetGameProfileContentByUuid(GameProfileContent obj)
 {
     return act.SetGameProfileContentByUuid(DEFAULT_SET_TYPE, obj);
 }
Esempio n. 18
0
        //------------------------------------------------------------------------------
        public virtual void SetGameProfileContentByUuid()
        {
            ResponseGameProfileContentBool wrapper = new ResponseGameProfileContentBool();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game-profile-content/set/by-uuid";

            GameProfileContent obj = new GameProfileContent();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            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 _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.SetGameProfileContentByUuid(obj);

            util.SerializeTypeJSONToResponse(_context, wrapper);
        }