private void gvEmpList_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { fmEmpEdit fEdit = new fmEmpEdit(); fEdit.empID = gvEmpList.Rows[e.RowIndex].Cells[0].Value.ToString(); fEdit.ShowDialog(); LoadEmployeeGrid(); }
private void btnAdd_Click(object sender, EventArgs e) { Employee emp = new Employee(); emp.FirstName = "New"; emp.Branch = GetBranch(); emp.QBFile = GetCompany(); emp.EmployeeID = new ModelToSQL <Employee>().WriteInsertSQL("Employee", emp, "EmployeeID", CommonProcs.WCompanyConnStr); fmEmpEdit fEdit = new fmEmpEdit(); fEdit.empID = emp.EmployeeID.ToString(); fEdit.ShowDialog(); LoadEmployeeGrid(); }