private void barButtonItemUpdate_ItemClick(object sender, ItemClickEventArgs e) { if (string.IsNullOrEmpty(_productId)) { XtraMessageBox.Show("Bạn chưa chọn Hàng Hóa cần sửa!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { var update = new FormUpdateProduct(_productId); update.ShowDialog(); LoadProducts(null); _productId = null; EnableButtonUpdateAndDelete(false); } }
private void gridView1_DoubleClick(object sender, EventArgs e) { if (string.IsNullOrEmpty(_productId)) { XtraMessageBox.Show("Vui lòng chọn một Nhân Viên cần sửa!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { var update = new FormUpdateProduct(_productId); update.ShowDialog(); LoadProducts(null); _productId = null; EnableButtonUpdateAndDelete(false); } }