예제 #1
0
파일: DataBase.cs 프로젝트: imto1/TimeSheet
        public void addExpertise(Expertise xp)
        {
            string sql = "INSERT INTO expertise (xp) VALUES ('" + xp.getXp() + "');";

            connection.Open();
            SQLiteCommand command = new SQLiteCommand(sql, connection);

            command.ExecuteNonQuery();
            connection.Close();
        }
예제 #2
0
파일: DataBase.cs 프로젝트: imto1/TimeSheet
        public void updateExpertise(Expertise xp)
        {
            string sql = "UPDATE expertise SET xp = '" + xp.getXp() +
                         "' WHERE id = " + xp.getId() + ";";

            connection.Open();
            SQLiteCommand command = new SQLiteCommand(sql, connection);

            command.ExecuteNonQuery();
            connection.Close();
        }