Example #1
0
        public void UpdateConversation(string bot_name, int id, string say, ConversationalResponseItems cri)
        {
            SQLiteCommand command = _SQL.CreateCommand();

            command.CommandText = "UPDATE " + bot_name + " SET conversation_say = $say, conversation_responseitems = $cri WHERE conversation_id = " + id.ToString();
            command.Parameters.AddWithValue("$say", say);
            command.Parameters.AddWithValue("$cri", ConversationalResponseItems.Serialize(cri));
            command.ExecuteNonQuery();
        }
Example #2
0
        public void AddNewConversation(string bot_name, string say, ConversationalResponseItems items)
        {
            SQLiteCommand addNewResponseCommand = _SQL.CreateCommand();

            addNewResponseCommand.CommandText = "INSERT INTO " + bot_name + " (conversation_say, conversation_responseitems) VALUES($say, $items)";
            addNewResponseCommand.Parameters.AddWithValue("$say", say);
            addNewResponseCommand.Parameters.AddWithValue("$items", ConversationalResponseItems.Serialize(items));
            addNewResponseCommand.ExecuteNonQuery();
        }