private void btntrug_Click(object sender, EventArgs e) { frmcommentaar comms = new frmcommentaar(); comms.Show(); this.Hide(); }
private void commentaar(int place) { boek_info = place; frmcommentaar comm = new frmcommentaar(); comm.Show(); this.Hide(); }
private void pcbboek2_Click(object sender, EventArgs e) { frmboeken.Key = 3; frmcommentaar comm = new frmcommentaar(); comm.Show(); this.Hide(); }
private void doorsturen() { string commentaar = txtmessage.Text; bool like = false; if (rdbgoed.Checked) { like = true; } int id = frmcommentaar.boekid; string user = frminloggen.gebruiker; int userid = user_identification(user); String verbindingsstring = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source= Bib.accdb"; OleDbConnection verbinding = new OleDbConnection(verbindingsstring); try { verbinding.Open(); String code = "INSERT INTO tblCommentaar ( Boekid, Gebruikerid, commentaar, [Like] ) VALUES(?,?,?,?)"; OleDbCommand opdracht = new OleDbCommand(code, verbinding); opdracht.Parameters.AddWithValue("", id); opdracht.Parameters.AddWithValue("", userid); opdracht.Parameters.AddWithValue("", commentaar); opdracht.Parameters.AddWithValue("", like); opdracht.ExecuteNonQuery(); } catch (Exception ex) { MessageBox.Show("hey " + ex); } finally { MessageBox.Show("U comment is opgeslaan"); verbinding.Close(); frmcommentaar comms = new frmcommentaar(); comms.Show(); this.Hide(); } }