Sakuno.KanColle.Amatsukaze.Game.Services.Records.QuestProgressRecords.InsertRecord C# (CSharp) Method

InsertRecord() private method

private InsertRecord ( RawQuest rpQuest, int rpProgress ) : void
rpQuest Sakuno.KanColle.Amatsukaze.Game.Models.Raw.RawQuest
rpProgress int
return void
        internal void InsertRecord(RawQuest rpQuest, int rpProgress)
        {
            using (var rCommand = Connection.CreateCommand())
            {
                rCommand.CommandText = "INSERT OR REPLACE INTO quest(id, name, description, type, state, progress, update_time) " +
                    "VALUES(@id, @name, @description, @type, @state, @progress, strftime('%s', 'now'));";
                rCommand.Parameters.AddWithValue("@id", rpQuest.ID);
                rCommand.Parameters.AddWithValue("@name", rpQuest.Name);
                rCommand.Parameters.AddWithValue("@description", rpQuest.Description);
                rCommand.Parameters.AddWithValue("@type", rpQuest.Type);
                rCommand.Parameters.AddWithValue("@state", (int)rpQuest.State);
                rCommand.Parameters.AddWithValue("@progress", rpProgress);

                rCommand.ExecuteNonQuery();
            }
        }