public ImportProduct(int?rowId = null, int?SupplierId = null, int?ProductId = null)
        {
            InitializeComponent();
            _supplierBusinessLogic = new SupplierBusinessLogic();
            _productBusinessLogic  = new ProductBusinessLogic();
            _importBusinessLogic   = new ImportBusinessLogic();

            btn_importProduct.Enabled = false;
            txtB_Quantity.Enabled     = false;
            txtB_UnitPrice.Enabled    = false;

            if (rowId == null || SupplierId == null || ProductId == null)
            {
                return;
            }
            btn_Unclock.Text = @"Chỉnh sửa";
            _isUpdate        = true;
            _rowId           = (int)rowId;
            _supplierId      = (int)SupplierId;
            _productId       = (int)ProductId;

            var supplier = _supplierBusinessLogic.GetDetailSupplier(_supplierId);

            txtB_SupplierName.Text  = supplier.Name;
            txtB_SupplierEmail.Text = supplier.Email;
            txtB_SupplierPhone.Text = supplier.Phone;

            var product = _productBusinessLogic.GetProductById(_productId);

            txtB_ProductName.Text  = product.Name;
            txtB_ProductPrice.Text = product.Price.ToString();
            txtB_UnitInStock.Text  = product.unitInStock.ToString();
            txtB_UnitOnBill.Text   = product.unitOnBill.ToString();
        }
 public MainForm()
 {
     InitializeComponent();
     _supplierBusinessLogic    = new SupplierBusinessLogic();
     _productBusinessLogic     = new ProductBusinessLogic();
     _userBusinessLogic        = new UserBusinessLogic();
     _billBusinessLogic        = new BillBusinessLogic();
     _shipperBusinessLogic     = new ShipperBussinessLogic();
     _productTypeBusinessLogic = new ProductTypeBusinessLogic();
     _importBusinessLogic      = new ImportBusinessLogic();
 }