private void itemThem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmNhapKho frm = new frmNhapKho(); frm.ShowDialog(); LoadData(); }
private void itemSua_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { if (gvNhapKho.GetFocusedRowCellValue("ID") == null) { XtraMessageBox.Show("Bạn chưa chọn dòng cần sửa.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var row = (NhapKho_SelectResult)gvNhapKho.GetFocusedRow(); frmNhapKho frm = new frmNhapKho(); frm.ID = (int)gvNhapKho.GetFocusedRowCellValue("ID"); frm.objNK_Select = row; frm.ShowDialog(); row = frm.objNK_Select; gvNhapKho.RefreshRow(gvNhapKho.FocusedRowHandle); } catch { } }