Beispiel #1
0
 public ReturnForm(ref Register register, ref InventoryControl ic, ref ReportControl rc)
 {
     m_register = register;
     InitializeComponent();
     m_products  = new List <Product>();
     m_report    = rc;
     m_inventory = ic;
 }
 public DiscontinueItemForm(ref Register register, ref InventoryControl ic, ref ReportControl rc)
 {
     InitializeComponent();
     m_register  = register;
     m_inventory = ic;
     m_report    = rc;
     foreach (Product p in register.Products)
     {
         if (!p.Discontinued)
         {
             listOfProducts.Items.Add(p);
         }
     }
     CancelButton = cancelButton;
     CancelButton.DialogResult = DialogResult.OK;
 }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UpdateProductForm"/> class.
        /// </summary>
        /// <param name="register">The register.</param>
        /// <param name="product">The product.</param>
        /// <param name="ic">The ic.</param>
        public UpdateProductForm(ref Register register, Product product, InventoryControl ic)
        {
            InitializeComponent();

            m_product   = product;
            m_register  = register;
            m_inventory = ic;

            itemNameBox.Text  = m_product.ItemName;
            quantityNum.Value = m_product.Quantity;
            costNum.Value     = (decimal)m_product.Cost.Value / (decimal)100;
            priceNum.Value    = (decimal)m_product.Price.Value / (decimal)100;

            CancelButton = cancelButton;
            CancelButton.DialogResult = DialogResult.Cancel;
        }