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