Inheritance: System.Windows.Forms.Panel
 public void RemovePanel(BrettProductPanel BPP)
 {
     pnlContainer.Controls.Remove(BPP);
     pnlList.Remove(BPP);
 }
 private void AddPanel(OrderDetail detail)
 {
     BrettProductPanel BPP = new BrettProductPanel(pnlList, productList, pnlContainer.Width, pnlContainer.Height, pnlContainer.Left, detail.ProductID, detail.Quantity, detail.Discount, detail.UnitPrice);
     SetupPanel(BPP);
 }
        private void SetupPanel(BrettProductPanel BPP)
        {
            try
            {
                lblError.Text = "";
                pnlContainer.Controls.Add(BPP);
                pnlList.Add(BPP);
                BPP.RemovePanel += RemovePanel;
                BPP.AddProductPanel += AddPanel;
                BPP.CalcFreight += CalculateFreight;
                BPP.ErrorInCommit += BPP_ErrorInCommit;

                // I dont know if I like this way for it is efficient
                lblProduct.Left = BrettProductPanel.lblProductX;
                lblPrice.Left = BrettProductPanel.lblPriceX;
                lblUnits.Left = BrettProductPanel.lblUnitsX;
                lblQuantity.Left = BrettProductPanel.lblQuantityX;
                lblDiscount.Left = BrettProductPanel.lblDiscountX;
                lblTotalPrice.Left = BrettProductPanel.lblTotalPriceX;
                BPP.WowSelectedIndexIsAnnoying();
            }
            catch (Exception ex)
            {
                lblError.Text = ex.Message;
            }
        }
 private void AddPanel()
 {
     BrettProductPanel BPP = new BrettProductPanel(pnlList, productList, pnlContainer.Width, pnlContainer.Height, pnlContainer.Left);
     SetupPanel(BPP);
 }