private void updatepwi_btn_Click(object sender, EventArgs e) { string query = "UPDATE detailsinsurance set pinsurance = '" + process_txt.Text + "', tariff = '" + priceprocess_txt.Text + "' where id= '" + idprocess_txt.Text + "'"; DBManager c = new DBManager(); c.command(query); seepwi frm = new seepwi(); frm.loaddgv(); Close(); //try //{ // SQLiteConnection cnx = new SQLiteConnection("Data Source=C:\\syspandemic\\db\\syspandemic.db;Version=3;"); // cnx.Open(); // string comando = "UPDATE detailsinsurance set pinsurance = '" + process_txt.Text + "', tariff = '" + priceprocess_txt.Text + "' where id= '" +idprocess_txt.Text+"'"; // SQLiteCommand insertion = new SQLiteCommand(comando, cnx); // if (insertion.ExecuteNonQuery() > 0) // { // cnx.Close(); // seepwi frm = new seepwi(); // frm.loaddgv(); // MessageBox.Show("Se ha actualizado!"); // Close(); // } // else // { // MessageBox.Show("No se consiguio"); // } //} //catch (Exception ex) //{ // MessageBox.Show(ex.Message, "Error"); //} }
private void addpwi_FormClosing(object sender, FormClosingEventArgs e) { seepwi frm = new seepwi(); frm.loaddgv(); }