private void OnAdd() { dlgAddNhatKyKienHeCongTy dlg = new dlgAddNhatKyKienHeCongTy(); if (dlg.ShowDialog(this) == DialogResult.OK) { DisplayAsThread(); } }
private void OnEdit() { if (dgNhatKyLienHeCongTy.SelectedRows == null || dgNhatKyLienHeCongTy.SelectedRows.Count <= 0) { MsgBox.Show(Application.ProductName, "Vui lòng chọn 1 nhật ký liên hệ.", IconType.Information); return; } DataRow drNhatKyLienHeCongTy = (dgNhatKyLienHeCongTy.SelectedRows[0].DataBoundItem as DataRowView).Row; dlgAddNhatKyKienHeCongTy dlg = new dlgAddNhatKyKienHeCongTy(drNhatKyLienHeCongTy); if (dlg.ShowDialog(this) == DialogResult.OK) { DisplayAsThread(); } }