private void OnAddService() { dlgAddServices dlg = new dlgAddServices(); if (dlg.ShowDialog(this) == DialogResult.OK) { SearchAsThread(); } }
private void OnEditService() { if (dgService.SelectedRows == null || dgService.SelectedRows.Count <= 0) { MsgBox.Show(Application.ProductName, "Vui lòng chọn 1 dịch vụ.", IconType.Information); return; } DataRow drService = (dgService.SelectedRows[0].DataBoundItem as DataRowView).Row; if (drService == null) { return; } dlgAddServices dlg = new dlgAddServices(drService); if (dlg.ShowDialog() == DialogResult.OK) { SearchAsThread(); } }