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

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

            return(data);
        }
Esempio n. 2
0
 public virtual bool SetProfileGameNetworkByUuid(ProfileGameNetwork obj)
 {
     return act.SetProfileGameNetworkByUuid(DEFAULT_SET_TYPE, obj);
 }
Esempio n. 3
0
 public virtual bool SetProfileGameNetworkByUuid(SetType set_type, ProfileGameNetwork obj)
 {
     return act.SetProfileGameNetworkByUuid(ConvertSetTypeToString(set_type), obj);
 }
Esempio n. 4
0
 //------------------------------------------------------------------------------
 public virtual bool SetProfileGameNetworkByUuid(string set_type, ProfileGameNetwork obj)
 {
     return act.SetProfileGameNetworkByUuid(set_type, obj);
 }
Esempio n. 5
0
 public virtual bool SetProfileGameNetworkByNetworkUsernameByGameIdByGameNetworkId(ProfileGameNetwork obj)
 {
     return act.SetProfileGameNetworkByNetworkUsernameByGameIdByGameNetworkId(DEFAULT_SET_TYPE, obj);
 }
Esempio n. 6
0
 //------------------------------------------------------------------------------
 public virtual bool SetProfileGameNetworkByNetworkUsernameByGameIdByGameNetworkId(string set_type, ProfileGameNetwork obj)
 {
     return act.SetProfileGameNetworkByNetworkUsernameByGameIdByGameNetworkId(set_type, obj);
 }
Esempio n. 7
0
        //------------------------------------------------------------------------------
        public virtual bool SetProfileGameNetworkByUuid(string set_type, ProfileGameNetwork 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("@hash", obj.hash));
            parameters.Add(new SqlParameter("@profile_id", obj.profile_id));
            parameters.Add(new SqlParameter("@game_network_id", obj.game_network_id));
            parameters.Add(new SqlParameter("@network_username", obj.network_username));
            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("@uuid", obj.uuid));
            parameters.Add(new SqlParameter("@date_modified", obj.date_modified));
            parameters.Add(new SqlParameter("@network_fullname", obj.network_fullname));
            parameters.Add(new SqlParameter("@secret", obj.secret));
            parameters.Add(new SqlParameter("@token", obj.token));
            parameters.Add(new SqlParameter("@date_created", obj.date_created));
            parameters.Add(new SqlParameter("@network_auth", obj.network_auth));
            parameters.Add(new SqlParameter("@type", obj.type));
            parameters.Add(new SqlParameter("@network_user_id", obj.network_user_id));

            try {
                return (bool)data.ExecuteScalar(
                BaseGamingData.connectionString
                , CommandType.StoredProcedure
                , "usp_profile_game_network_set_by_uuid"
                , parameters
                );
            }
            catch (Exception e){
                log.Error(e);
                return false;
            }
        }
Esempio n. 8
0
        //------------------------------------------------------------------------------
        public virtual bool SetProfileGameNetworkByProfileIdByGameIdByGameNetworkId(string set_type, ProfileGameNetwork 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_hash", obj.hash));
            parameters.Add(new NpgsqlParameter("in_profile_id", obj.profile_id));
            parameters.Add(new NpgsqlParameter("in_game_network_id", obj.game_network_id));
            parameters.Add(new NpgsqlParameter("in_network_username", obj.network_username));
            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_uuid", obj.uuid));
            parameters.Add(new NpgsqlParameter("in_date_modified", obj.date_modified));
            parameters.Add(new NpgsqlParameter("in_network_fullname", obj.network_fullname));
            parameters.Add(new NpgsqlParameter("in_secret", obj.secret));
            parameters.Add(new NpgsqlParameter("in_token", obj.token));
            parameters.Add(new NpgsqlParameter("in_date_created", obj.date_created));
            parameters.Add(new NpgsqlParameter("in_network_auth", obj.network_auth));
            parameters.Add(new NpgsqlParameter("in_type", obj.type));
            parameters.Add(new NpgsqlParameter("in_network_user_id", obj.network_user_id));

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

            if (dr["status"] != null)
                    obj.status = dataType.FillDataString(dr, "status");
            if (dr["hash"] != null)
                    obj.hash = dataType.FillDataString(dr, "hash");
            if (dr["profile_id"] != null)
                    obj.profile_id = dataType.FillDataString(dr, "profile_id");
            if (dr["game_network_id"] != null)
                    obj.game_network_id = dataType.FillDataString(dr, "game_network_id");
            if (dr["network_username"] != null)
                    obj.network_username = dataType.FillDataString(dr, "network_username");
            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["uuid"] != null)
                    obj.uuid = dataType.FillDataString(dr, "uuid");
            if (dr["date_modified"] != null)
                    obj.date_modified = dataType.FillDataDateTime(dr, "date_modified");
            if (dr["network_fullname"] != null)
                    obj.network_fullname = dataType.FillDataString(dr, "network_fullname");
            if (dr["secret"] != null)
                    obj.secret = dataType.FillDataString(dr, "secret");
            if (dr["token"] != null)
                    obj.token = dataType.FillDataString(dr, "token");
            if (dr["date_created"] != null)
                    obj.date_created = dataType.FillDataDateTime(dr, "date_created");
            if (dr["network_auth"] != null)
                    obj.network_auth = dataType.FillDataString(dr, "network_auth");
            if (dr["type"] != null)
                    obj.type = dataType.FillDataString(dr, "type");
            if (dr["network_user_id"] != null)
                    obj.network_user_id = dataType.FillDataString(dr, "network_user_id");

            return obj;
        }
Esempio n. 10
0
 public virtual bool SetProfileGameNetworkByProfileIdByGameIdByGameNetworkId(string set_type, ProfileGameNetwork obj)
 {
     return data.SetProfileGameNetworkByProfileIdByGameIdByGameNetworkId(set_type, obj);
 }
Esempio n. 11
0
        //------------------------------------------------------------------------------
        public virtual void SetProfileGameNetworkByUuid()
        {
            ResponseProfileGameNetworkBool wrapper = new ResponseProfileGameNetworkBool();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "profile-game-network/set/by-uuid";

            ProfileGameNetwork obj = new ProfileGameNetwork();

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

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

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

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

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

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

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

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

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

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

            util.SerializeTypeJSONToResponse(_context, wrapper);
        }