private void SubmitBtn_Click(object sender, RoutedEventArgs e) { SqlConnection con = new SqlConnection(connectionString); string intL; try { con.Open(); if (IntlAcct.IsChecked == true) { intL = "true"; } else { intL = "false"; } string updateNewRecs = "INSERT INTO NEWACCOUNTS (TRANS_SHIPPER, ACCT_END_DT, ETT_STAT, " + "DESCRIPTION, ) VALUES('" + this.TransShip.Text + "', " + "'" + this.SourceBox.Text + "','" + this.ShipName.Text + "','" + this.AcctEndDt.Text + "','" + this.EttStat.Text + "','" + this.IssDesc.Text + "')"; SqlCommand sqlCmd = new SqlCommand(updateNewRecs, con); sqlCmd.Parameters.AddWithValue("@INTL_ACCT", intL); sqlCmd.ExecuteNonQuery(); MessageBox.Show("Saved"); ErrorFile_Updates errU = new ErrorFile_Updates(arr); con.Close(); this.Close(); errU.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void UpdateRecs_Click(object sender, RoutedEventArgs e) { ErrorFile_Updates erMe = new ErrorFile_Updates(arr); erMe.Show(); }