public void AddPatch(string guid, string kbnumber, Update.UpdateStatus status, string file_name) { using (SQLiteConnection connection = new SQLiteConnection(connectionString)) { connection.Open(); string sql = "INSERT INTO spupdate (guid, kb_number, status, file_name) VALUES (" + guid +"," + kbnumber + "," + status + "," + file_name + ")"; SQLiteCommand cmd = new SQLiteCommand(sql, connection); cmd.ExecuteNonQuery(); connection.Close(); } }
private void BTN_Download_Click(object sender, EventArgs e) { if (BTN_Download.Text == "Download Only") { //Just going to download the updates foreach (DataGridViewRow item in GView_spupdates.SelectedRows) { string product = item.Cells[0].Value.ToString(); string title = item.Cells[1].Value.ToString(); string kbnumber = item.Cells[3].Value.ToString(); log.Info("Begining download for: " + product + "(" + kbnumber + ") - " + title); Update update = new Update(); update.DownloadUpdates(kbnumber, "./Updates/" + kbnumber); } } else { } }