CURELab.SignLanguage.HandDetector.DBManager.AddWordModel C# (CSharp) Method

AddWordModel() public method

public AddWordModel ( SignWordModel wordModel, int index ) : void
wordModel SignWordModel
index int
return void
        public void AddWordModel(SignWordModel wordModel, int index)
        {
            try
            {
                SQLiteCommand insertCommand = new SQLiteCommand(connection);

                string insertWord =
                 @"INSERT  OR REPLACE INTO SignWord (SignID,SignIndex,Chinese,English,Count) VALUES" +
                 "(@ID,@Index, @Chinese, @English,0)";
                insertCommand = new SQLiteCommand(insertWord, connection);
                insertCommand.Parameters.AddWithValue("@ID", wordModel.SignID);
                insertCommand.Parameters.AddWithValue("@Index", index);
                insertCommand.Parameters.AddWithValue("@Chinese", wordModel.Chinese);
                insertCommand.Parameters.AddWithValue("@English", wordModel.English);
                insertCommand.ExecuteNonQuery();

            }
            catch (Exception e)
            {
                tran.Rollback();
                throw;
            }
        }