private void addNewEmployeeToolStripMenuItem_Click(object sender, EventArgs e) { AddEmployee frm = new AddEmployee(); frm.ShowDialog(); this.Close(); }
private void editEmployeeToolStripMenuItem_Click(object sender, EventArgs e) { OleDbConnection connection = new OleDbConnection(connS); try { foreach (ListViewItem itm in lvEmployees.Items) { if (itm.Checked) { MessageBox.Show("You chose to edit this employee: " + itm.SubItems[1].Text + " " + itm.SubItems[2].Text); AddEmployee frme = new AddEmployee(itm.Text, itm.SubItems[1].Text, itm.SubItems[2].Text, itm.SubItems[4].Text, itm.SubItems[3].Text); frme.ShowDialog(); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { refreshListView(); } }
private void button3_Click(object sender, EventArgs e) { AddEmployee frm = new AddEmployee(); frm.ShowDialog(); }