Exemple #1
0
        public List <GameLeaderboardRollup> GetList(List <Dictionary <string, object> > dictList)
        {
            data.Clear();

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

            return(data);
        }
Exemple #2
0
 public virtual bool SetGameLeaderboardRollupByUuidByProfileIdByGameIdByTimestamp(GameLeaderboardRollup obj)
 {
     return act.SetGameLeaderboardRollupByUuidByProfileIdByGameIdByTimestamp(DEFAULT_SET_TYPE, obj);
 }
Exemple #3
0
 public virtual bool SetGameLeaderboardRollupByUuidByProfileIdByGameIdByTimestamp(SetType set_type, GameLeaderboardRollup obj)
 {
     return act.SetGameLeaderboardRollupByUuidByProfileIdByGameIdByTimestamp(ConvertSetTypeToString(set_type), obj);
 }
Exemple #4
0
 //------------------------------------------------------------------------------
 public virtual bool SetGameLeaderboardRollupByUuidByProfileIdByGameIdByTimestamp(string set_type, GameLeaderboardRollup obj)
 {
     return act.SetGameLeaderboardRollupByUuidByProfileIdByGameIdByTimestamp(set_type, obj);
 }
Exemple #5
0
 public virtual bool SetGameLeaderboardRollupByUuid(GameLeaderboardRollup obj)
 {
     return act.SetGameLeaderboardRollupByUuid(DEFAULT_SET_TYPE, obj);
 }
Exemple #6
0
 public virtual bool SetGameLeaderboardRollupByUuid(SetType set_type, GameLeaderboardRollup obj)
 {
     return act.SetGameLeaderboardRollupByUuid(ConvertSetTypeToString(set_type), obj);
 }
Exemple #7
0
 //------------------------------------------------------------------------------
 public virtual bool SetGameLeaderboardRollupByUuid(string set_type, GameLeaderboardRollup obj)
 {
     return act.SetGameLeaderboardRollupByUuid(set_type, obj);
 }
Exemple #8
0
 public virtual bool SetGameLeaderboardRollupByCodeByGameIdByProfileId(GameLeaderboardRollup obj)
 {
     return act.SetGameLeaderboardRollupByCodeByGameIdByProfileId(DEFAULT_SET_TYPE, obj);
 }
Exemple #9
0
 //------------------------------------------------------------------------------
 public virtual bool SetGameLeaderboardRollupByCodeByGameIdByProfileId(string set_type, GameLeaderboardRollup obj)
 {
     return act.SetGameLeaderboardRollupByCodeByGameIdByProfileId(set_type, obj);
 }
Exemple #10
0
        //------------------------------------------------------------------------------
        public virtual bool SetGameLeaderboardRollupByUuidByProfileIdByGameIdByTimestamp(string set_type, GameLeaderboardRollup obj)
        {
            List<SqlParameter> parameters
                = new List<SqlParameter>();
            parameters.Add(new SqlParameter("@set_type", set_type));
            parameters.Add(new SqlParameter("@status", obj.status));
            parameters.Add(new SqlParameter("@username", obj.username));
            parameters.Add(new SqlParameter("@code", obj.code));
            parameters.Add(new SqlParameter("@timestamp", obj.timestamp));
            parameters.Add(new SqlParameter("@profile_id", obj.profile_id));
            parameters.Add(new SqlParameter("@rank", obj.rank));
            parameters.Add(new SqlParameter("@rank_change", obj.rank_change));
            parameters.Add(new SqlParameter("@game_id", obj.game_id));
            parameters.Add(new SqlParameter("@active", obj.active));
            parameters.Add(new SqlParameter("@rank_total_count", obj.rank_total_count));
            parameters.Add(new SqlParameter("@absolute_value", obj.absolute_value));
            parameters.Add(new SqlParameter("@data", obj.data));
            parameters.Add(new SqlParameter("@stat_value", obj.stat_value));
            parameters.Add(new SqlParameter("@network", obj.network));
            parameters.Add(new SqlParameter("@uuid", obj.uuid));
            parameters.Add(new SqlParameter("@date_modified", obj.date_modified));
            parameters.Add(new SqlParameter("@level", obj.level));
            parameters.Add(new SqlParameter("@stat_value_formatted", obj.stat_value_formatted));
            parameters.Add(new SqlParameter("@date_created", obj.date_created));
            parameters.Add(new SqlParameter("@type", obj.type));

            try {
                return (bool)data.ExecuteScalar(
                BaseGamingData.connectionString
                , CommandType.StoredProcedure
                , "usp_game_leaderboard_rollup_set_by_uuid_by_profile_id_by_game_id_by_timestamp"
                , parameters
                );
            }
            catch (Exception e){
                log.Error(e);
                return false;
            }
        }
Exemple #11
0
        //------------------------------------------------------------------------------
        public virtual bool SetGameLeaderboardRollupByUuid(string set_type, GameLeaderboardRollup obj)
        {
            List<NpgsqlParameter> parameters
                = new List<NpgsqlParameter>();
            parameters.Add(new NpgsqlParameter("in_set_type", set_type));
            parameters.Add(new NpgsqlParameter("in_status", obj.status));
            parameters.Add(new NpgsqlParameter("in_username", obj.username));
            parameters.Add(new NpgsqlParameter("in_code", obj.code));
            parameters.Add(new NpgsqlParameter("in_timestamp", obj.timestamp));
            parameters.Add(new NpgsqlParameter("in_profile_id", obj.profile_id));
            parameters.Add(new NpgsqlParameter("in_rank", obj.rank));
            parameters.Add(new NpgsqlParameter("in_rank_change", obj.rank_change));
            parameters.Add(new NpgsqlParameter("in_game_id", obj.game_id));
            parameters.Add(new NpgsqlParameter("in_active", obj.active));
            parameters.Add(new NpgsqlParameter("in_rank_total_count", obj.rank_total_count));
            parameters.Add(new NpgsqlParameter("in_absolute_value", obj.absolute_value));
            parameters.Add(new NpgsqlParameter("in_data", obj.data));
            parameters.Add(new NpgsqlParameter("in_stat_value", obj.stat_value));
            parameters.Add(new NpgsqlParameter("in_network", obj.network));
            parameters.Add(new NpgsqlParameter("in_uuid", obj.uuid));
            parameters.Add(new NpgsqlParameter("in_date_modified", obj.date_modified));
            parameters.Add(new NpgsqlParameter("in_level", obj.level));
            parameters.Add(new NpgsqlParameter("in_stat_value_formatted", obj.stat_value_formatted));
            parameters.Add(new NpgsqlParameter("in_date_created", obj.date_created));
            parameters.Add(new NpgsqlParameter("in_type", obj.type));

            try {
                return Convert.ToBoolean(data.ExecuteScalar(
                BaseGamingData.connectionString
                , CommandType.StoredProcedure
                , "usp_game_leaderboard_rollup_set_uuid"
                , parameters
                ));
            }
            catch (Exception e){
                log.Error(e);
                return false;
            }
        }
Exemple #12
0
        public virtual GameLeaderboardRollup FillGameLeaderboardRollup(DataRow dr)
        {
            GameLeaderboardRollup obj = new GameLeaderboardRollup();

            if (dr["status"] != null)
                    obj.status = dataType.FillDataString(dr, "status");
            if (dr["username"] != null)
                    obj.username = dataType.FillDataString(dr, "username");
            if (dr["code"] != null)
                    obj.code = dataType.FillDataString(dr, "code");
            if (dr["timestamp"] != null)
                    obj.timestamp = dataType.FillDataFloat(dr, "timestamp");
            if (dr["profile_id"] != null)
                    obj.profile_id = dataType.FillDataString(dr, "profile_id");
            if (dr["rank"] != null)
                    obj.rank = dataType.FillDataInt(dr, "rank");
            if (dr["rank_change"] != null)
                    obj.rank_change = dataType.FillDataInt(dr, "rank_change");
            if (dr["game_id"] != null)
                    obj.game_id = dataType.FillDataString(dr, "game_id");
            if (dr["active"] != null)
                    obj.active = dataType.FillDataBool(dr, "active");
            if (dr["rank_total_count"] != null)
                    obj.rank_total_count = dataType.FillDataInt(dr, "rank_total_count");
            if (dr["absolute_value"] != null)
                    obj.absolute_value = dataType.FillDataFloat(dr, "absolute_value");
            if (dr["data"] != null)
                    obj.data = dataType.FillDataString(dr, "data");
            if (dr["stat_value"] != null)
                    obj.stat_value = dataType.FillDataFloat(dr, "stat_value");
            if (dr["network"] != null)
                    obj.network = dataType.FillDataString(dr, "network");
            if (dr["uuid"] != null)
                    obj.uuid = dataType.FillDataString(dr, "uuid");
            if (dr["date_modified"] != null)
                    obj.date_modified = dataType.FillDataDateTime(dr, "date_modified");
            if (dr["level"] != null)
                    obj.level = dataType.FillDataString(dr, "level");
            if (dr["stat_value_formatted"] != null)
                    obj.stat_value_formatted = dataType.FillDataString(dr, "stat_value_formatted");
            if (dr["date_created"] != null)
                    obj.date_created = dataType.FillDataDateTime(dr, "date_created");
            if (dr["type"] != null)
                    obj.type = dataType.FillDataString(dr, "type");

            return obj;
        }
Exemple #13
0
 public virtual bool SetGameLeaderboardRollupByCode(string set_type, GameLeaderboardRollup obj)
 {
     return data.SetGameLeaderboardRollupByCode(set_type, obj);
 }
Exemple #14
0
        //------------------------------------------------------------------------------
        public virtual void SetGameLeaderboardRollupByUuidByProfileIdByGameIdByTimestamp()
        {
            ResponseGameLeaderboardRollupBool wrapper = new ResponseGameLeaderboardRollupBool();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game-leaderboard-rollup/set/by-uuid/by-profile-id/by-game-id/by-timestamp";

            GameLeaderboardRollup obj = new GameLeaderboardRollup();

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

            string _timestamp = util.GetParamValue(_context, "timestamp");
            if(!String.IsNullOrEmpty(_timestamp))
                obj.timestamp = float.Parse(_timestamp);

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

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

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

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

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

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

            string _absolute_value = util.GetParamValue(_context, "absolute_value");
            if(!String.IsNullOrEmpty(_absolute_value))
                obj.absolute_value = float.Parse(_absolute_value);

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

            string _stat_value = util.GetParamValue(_context, "stat_value");
            if(!String.IsNullOrEmpty(_stat_value))
                obj.stat_value = float.Parse(_stat_value);

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

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

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

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

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

            util.SerializeTypeJSONToResponse(_context, wrapper);
        }