private void btnAdd_Click(object sender, EventArgs e) { frmUserDetails fmUserDetails = new frmUserDetails(); fmUserDetails.Op = "add"; fmUserDetails.userList = this.userList; fmUserDetails.Show(); }
private void btnEdit_Click(object sender, EventArgs e) { if (gvUser.CurrentRow.Index >= 0) { frmUserDetails fmUserDetails = new frmUserDetails(); fmUserDetails.Op = "edit"; fmUserDetails.SelectedUser = userSelected; fmUserDetails.Show(); } }