private void itemThem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmEditBan frm = new frmEditBan(); frm.ShowDialog(); LoadData(); }
private void itemSua_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { if (gvBan.GetFocusedRowCellValue("ID") == null) { XtraMessageBox.Show("Hãy chọn [Bàn] cần sửa.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } frmEditBan frm = new frmEditBan(); frm.ID = (int)gvBan.GetFocusedRowCellValue("ID"); frm.ShowDialog(); LoadData(); } catch (Exception) { throw; } }