private void bttnAdd_Click(object sender, EventArgs e) { frmEmployee_AE f = new frmEmployee_AE(); f.ADD_STATE = true; f.ShowDialog(); loadvars(""); }
private void bttnEdit_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count < 1) { MessageBox.Show("Pls. Select an Item.", "Select Item", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { frmEmployee_AE f = new frmEmployee_AE(); f.ADD_STATE = false; f.employeeId = int.Parse(listView1.SelectedItems[0].Text); f.ShowDialog(); loadvars(""); } }