private void button1_Click(object sender, EventArgs e) { frm_AddEmployee frm = new frm_AddEmployee("INSERT"); frm.ShowDialog(); FillGrid(); }
private void editToolStripMenuItem_Click(object sender, EventArgs e) { if (dgvEmployeeList.Rows.Count > 0) { if (dgvEmployeeList.SelectedRows.Count == 1) { frm_AddEmployee frm = new frm_AddEmployee("UPDATE", this); frm.ShowDialog(); FillGrid(); } else { XtraMessageBox.Show("Please Select One"); } } else { XtraMessageBox.Show("Employee List is Empty"); } }