private void dgvDSNhanVien_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { UPDATE_EMPLOYEE updateForm = new UPDATE_EMPLOYEE(); updateForm.txtID.Text = this.dgvDSNhanVien.CurrentRow.Cells[0].Value.ToString(); updateForm.txtName.Text = this.dgvDSNhanVien.CurrentRow.Cells[1].Value.ToString(); updateForm.txtGender.Text = this.dgvDSNhanVien.CurrentRow.Cells[2].Value.ToString(); updateForm.txtAddress.Text = this.dgvDSNhanVien.CurrentRow.Cells[3].Value.ToString(); updateForm.txtPassword.Text = this.dgvDSNhanVien.CurrentRow.Cells[6].Value.ToString(); BUS.BUSUser.Instance.ShowPermission(updateForm.cbbRole, "UPDATE", Int32.Parse(this.dgvDSNhanVien.CurrentRow.Cells[5].Value.ToString())); updateForm.onUpdateData += LoadData; updateForm.ShowDialog(); }
private void btnUpdate_Click(object sender, EventArgs e) { UPDATE_EMPLOYEE updateForm = new UPDATE_EMPLOYEE(); updateForm.Show(); }