private void btnAdd_Click(object sender, EventArgs e) { frmEmployeeDetail employeeDetail = new frmEmployeeDetail(); employeeDetail.iFunction = 1; employeeDetail.ShowDialog(); if (employeeDetail.DialogResult == DialogResult.OK) { FillGridControl(); } }
private void btnEdit_Click(object sender, EventArgs e) { frmEmployeeDetail employeeDetail = new frmEmployeeDetail(); employeeDetail.iFunction = 2; employeeDetail.employee = new EmployeeDAO().GetByID(int.Parse(txtA.Text)); employeeDetail.ShowDialog(); if (employeeDetail.DialogResult == DialogResult.OK) { FillGridControl(); } }