private void btnThemYKienKhachHang_Click(object sender, EventArgs e) { object obj = _patientRow; dlgAddYKienKhachHang dlg = new dlgAddYKienKhachHang(obj); dlg.ShowDialog(this); }
private void OnAdd() { dlgAddYKienKhachHang dlg = new dlgAddYKienKhachHang(); if (dlg.ShowDialog(this) == DialogResult.OK) { DisplayAsThread(); } }
private void OnEdit() { if (dgYKienKhachHang.SelectedRows == null || dgYKienKhachHang.SelectedRows.Count <= 0) { MsgBox.Show(Application.ProductName, "Vui lòng chọn 1 ý kiến khách hàng.", IconType.Information); return; } DataRow drYKienKhachHang = (dgYKienKhachHang.SelectedRows[0].DataBoundItem as DataRowView).Row; dlgAddYKienKhachHang dlg = new dlgAddYKienKhachHang(drYKienKhachHang); if (dlg.ShowDialog(this) == DialogResult.OK) { DisplayAsThread(); } }