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

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

            return(data);
        }
Ejemplo n.º 2
0
 public virtual bool SetGameProfileStatisticItemByUuidByProfileIdByGameIdByTimestamp(GameProfileStatisticItem obj)
 {
     return act.SetGameProfileStatisticItemByUuidByProfileIdByGameIdByTimestamp(DEFAULT_SET_TYPE, obj);
 }
Ejemplo n.º 3
0
 public virtual bool SetGameProfileStatisticItemByUuidByProfileIdByGameIdByTimestamp(SetType set_type, GameProfileStatisticItem obj)
 {
     return act.SetGameProfileStatisticItemByUuidByProfileIdByGameIdByTimestamp(ConvertSetTypeToString(set_type), obj);
 }
Ejemplo n.º 4
0
 //------------------------------------------------------------------------------
 public virtual bool SetGameProfileStatisticItemByUuidByProfileIdByGameIdByTimestamp(string set_type, GameProfileStatisticItem obj)
 {
     return act.SetGameProfileStatisticItemByUuidByProfileIdByGameIdByTimestamp(set_type, obj);
 }
Ejemplo n.º 5
0
 public virtual bool SetGameProfileStatisticItemByUuid(GameProfileStatisticItem obj)
 {
     return act.SetGameProfileStatisticItemByUuid(DEFAULT_SET_TYPE, obj);
 }
Ejemplo n.º 6
0
 //------------------------------------------------------------------------------
 public virtual bool SetGameProfileStatisticItemByUuid(string set_type, GameProfileStatisticItem obj)
 {
     return act.SetGameProfileStatisticItemByUuid(set_type, obj);
 }
Ejemplo n.º 7
0
 public virtual bool SetGameProfileStatisticItemByProfileIdByCode(SetType set_type, GameProfileStatisticItem obj)
 {
     return act.SetGameProfileStatisticItemByProfileIdByCode(ConvertSetTypeToString(set_type), obj);
 }
Ejemplo n.º 8
0
 //------------------------------------------------------------------------------
 public virtual bool SetGameProfileStatisticItemByCodeByProfileIdByGameId(string set_type, GameProfileStatisticItem obj)
 {
     return act.SetGameProfileStatisticItemByCodeByProfileIdByGameId(set_type, obj);
 }
Ejemplo n.º 9
0
        //------------------------------------------------------------------------------
        public virtual bool SetGameProfileStatisticItemByUuidByProfileIdByGameIdByTimestamp(string set_type, GameProfileStatisticItem 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("@stat_value_formatted", obj.stat_value_formatted));
            parameters.Add(new SqlParameter("@profile_id", obj.profile_id));
            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("@stat_value", obj.stat_value));
            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("@points", obj.points));
            parameters.Add(new SqlParameter("@timestamp", obj.timestamp));
            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_profile_statistic_item_set_by_uuid_by_profile_id_by_game_id_by_timestamp"
                , parameters
                );
            }
            catch (Exception e){
                log.Error(e);
                return false;
            }
        }
Ejemplo n.º 10
0
        //------------------------------------------------------------------------------
        public virtual bool SetGameProfileStatisticItemByUuid(string set_type, GameProfileStatisticItem 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_stat_value_formatted", obj.stat_value_formatted));
            parameters.Add(new NpgsqlParameter("in_profile_id", obj.profile_id));
            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_stat_value", obj.stat_value));
            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_points", obj.points));
            parameters.Add(new NpgsqlParameter("in_timestamp", obj.timestamp));
            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_profile_statistic_item_set_uuid"
                , parameters
                ));
            }
            catch (Exception e){
                log.Error(e);
                return false;
            }
        }
Ejemplo n.º 11
0
        public virtual GameProfileStatisticItem FillGameProfileStatisticItem(DataRow dr)
        {
            GameProfileStatisticItem obj = new GameProfileStatisticItem();

            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["stat_value_formatted"] != null)
                    obj.stat_value_formatted = dataType.FillDataString(dr, "stat_value_formatted");
            if (dr["profile_id"] != null)
                    obj.profile_id = dataType.FillDataString(dr, "profile_id");
            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["stat_value"] != null)
                    obj.stat_value = dataType.FillDataFloat(dr, "stat_value");
            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["points"] != null)
                    obj.points = dataType.FillDataFloat(dr, "points");
            if (dr["timestamp"] != null)
                    obj.timestamp = dataType.FillDataFloat(dr, "timestamp");
            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;
        }
Ejemplo n.º 12
0
 public virtual bool SetGameProfileStatisticItemByProfileIdByCodeByTimestamp(string set_type, GameProfileStatisticItem obj)
 {
     return data.SetGameProfileStatisticItemByProfileIdByCodeByTimestamp(set_type, obj);
 }
Ejemplo n.º 13
0
        //------------------------------------------------------------------------------
        public virtual void SetGameProfileStatisticItemByUuidByProfileIdByGameIdByTimestamp()
        {
            ResponseGameProfileStatisticItemBool wrapper = new ResponseGameProfileStatisticItemBool();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game-profile-statistic-item/set/by-uuid/by-profile-id/by-game-id/by-timestamp";

            GameProfileStatisticItem obj = new GameProfileStatisticItem();

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

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

            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 _stat_value = util.GetParamValue(_context, "stat_value");
            if(!String.IsNullOrEmpty(_stat_value))
                obj.stat_value = float.Parse(_stat_value);

            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 _points = util.GetParamValue(_context, "points");
            if(!String.IsNullOrEmpty(_points))
                obj.points = float.Parse(_points);

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

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

            util.SerializeTypeJSONToResponse(_context, wrapper);
        }