private void button3_Click(object sender, EventArgs e) { try { state = "add"; DataTable Dt = new DataTable(); Dt = CBE.VerifyCrime(textBox1.Text); if (Dt.Rows.Count > 0) { MessageBox.Show("DUBLICATION", "RECORD DUBLICATED", MessageBoxButtons.OK, MessageBoxIcon.Warning); textBox1.Focus(); textBox1.SelectionStart = 0; textBox1.SelectionLength = textBox1.TextLength; return; } CBE.addcrime(textBox1.Text); MessageBox.Show("NEW CRIMINAL BEHAVIOR ADDED ", "ADD", MessageBoxButtons.OK, MessageBoxIcon.Information); this.dataGridView1.DataSource = CBE.getallgridview(); FRM_SUSPECT.getMainForm.CBOBOX.DataSource = sus.Getallcrimebehaviour(); FRM_SUSPECT.getMainForm.CBOBOX.SelectedIndex = -1; FRM_SUSPECT.getMainForm.CBOBOX2.DataSource = sus.Getallcrimebehaviour(); FRM_SUSPECT.getMainForm.CBOBOX2.SelectedIndex = -1; } catch { MessageBox.Show("error"); return; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)