private void loadBugToolStripMenuItem_Click(object sender, EventArgs e) { LoadBug frmchild = new LoadBug(); frmchild.MdiParent = this; frmchild.Show(); frmchild.toUser(label1.Text); }
private void Update_Click(object sender, EventArgs e) { //when the update button is clicked, runs SQL update query and adds all new fields to the database SqlCeCommand cmd = new SqlCeCommand("UPDATE tbl_bug SET bug_id = @bug_id, code = @code, status = @status, importance = @importance WHERE bug_id = @bug_id", mySqlConnection); //adds the the text fields and combo fields to the query, so can add to database cmd.Parameters.AddWithValue("@bug_id", comboBox1.Text); cmd.Parameters.AddWithValue("@code", txtCode.Text); cmd.Parameters.AddWithValue("@status", txtStatus.Text); cmd.Parameters.AddWithValue("@importance", cmbImp.Text); cmd.ExecuteNonQuery(); LoadBug ld = new LoadBug(); this.Close(); ld.Show(); }