예제 #1
0
        private void BtnXoa_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (XtraMessageBox.Show("Bạn có chắc chắn muốn xóa ?", "CẢNH BÁO", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
                == DialogResult.No)
            {
                return;
            }
            int    rowIndex = gvMain.FocusedRowHandle;
            string colID    = "Product_ID";
            string value    = gvMain.GetRowCellValue(rowIndex, colID).ToString();

            if (BUS_HangHoa.KiemTraHH(value) == true)
            {
                BUS_HangHoa.XoaHH(value);

                Action.Module     = "Hàng Hóa";
                Action.ActionName = "Xóa";
                Action.Reference  = value;
                Action.LuuThongTin();

                LoadData();
            }
            else
            {
                return;
            }
        }