private void dgvEmployeeList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { AddEmployee frmAddCustomer = new AddEmployee(); DataGridViewRow currentRow = dgvEmployeeList.Rows[e.RowIndex]; int id = ObjectHelper.GetValueFromAnonymousType<int>(currentRow.DataBoundItem, "Id"); frmAddCustomer.loadDataForEditEmployee(id); frmAddCustomer.CallFromUserControll = this; frmAddCustomer.ShowDialog(); }
private void dgvEmployeeList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { AddEmployee frmAddCustomer = new AddEmployee(); DataGridViewRow currentRow = dgvEmployeeList.Rows[e.RowIndex]; int id = ObjectHelper.GetValueFromAnonymousType <int>(currentRow.DataBoundItem, "Id"); frmAddCustomer.loadDataForEditEmployee(id); frmAddCustomer.CallFromUserControll = this; frmAddCustomer.ShowDialog(); }
private void btnAdd_Click(object sender, EventArgs e) { AddEmployee frmAddEmpl = new AddEmployee(); frmAddEmpl.CallFromUserControll = this; frmAddEmpl.ShowDialog(); }