public fThemKho(bool isAdd = true, CKho kho = null, fKhoHang.sendMessage send = null) { InitializeComponent(); if (isAdd == false && kho == null) { XtraMessageBox.Show("ERROR : Dữ liệu không được cung cấp để thực hiện hành động !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); Close(); } if (isAdd == true) { table = BUS_KhoXuat.LayKho(); Text = "Thêm nhà cung cấp"; } else { editKho = kho; Text = "Sửa thông tin nhà cung cấp"; } add = isAdd; sendKho = send; Init(); }
private void LoadData() { gcMain.DataSource = BUS_KhoXuat.LayKho(); }