private void OnEditThuoc() { if (_dictThuoc == null) { return; } if (dgThuoc.SelectedRows == null || dgThuoc.SelectedRows.Count <= 0) { MsgBox.Show(Application.ProductName, "Vui lòng chọn 1 thuốc.", IconType.Information); return; } DataRow drThuoc = (dgThuoc.SelectedRows[0].DataBoundItem as DataRowView).Row; if (drThuoc == null) { return; } dlgAddThuoc dlg = new dlgAddThuoc(drThuoc, AllowEdit); if (dlg.ShowDialog() == DialogResult.OK) { SearchAsThread(); } }
private void OnAddThuoc() { dlgAddThuoc dlg = new dlgAddThuoc(); if (dlg.ShowDialog(this) == DialogResult.OK) { SearchAsThread(); } }