private void button3_Click(object sender, EventArgs e) { if (int.Parse(listView1.SelectedItems[0].SubItems[6].Text) > Sqlite.ClientBalance(listView1.SelectedItems[0].SubItems[1].Text)) { MessageBox.Show("Not enough balance"); return; } SQLiteConnection scn = new SQLiteConnection(@"data source = main.db"); scn.Open(); SQLiteCommand sq; sq = new SQLiteCommand("update Trips set Status='Paid' where Tripno = '" + listView1.SelectedItems[0].Text + "'", scn); sq.ExecuteNonQuery(); filter.PerformClick(); }
private void button2_Click_1(object sender, EventArgs e) { MessageBox.Show(Sqlite.ClientBalance(clientname.Text).ToString()); }