Exemplo n.º 1
0
        // must pass car model. check username
        private void loadInventory(clsCar car)
        {
            lvInventory.Items.Clear();
            lvInventory.SuspendLayout();
            List <clsInventory> list = new List <clsInventory>();

            clsInventory clsinventory = new clsInventory();

            list = clsinventory.getList(car);

            foreach (clsInventory inventory in list)
            {
                ListViewItem oItem = new ListViewItem();

                oItem.Text = inventory.TrackingCode;
                oItem.SubItems.Add(inventory.Details);
                oItem.SubItems.Add(inventory.Supplier);
                oItem.Tag = inventory;

                lvInventory.Items.Add(oItem);
            }

            tsslInventoryAvailableStocks.Text = "Available Stocks: " + lvInventory.Items.Count;
            lvInventory.ResumeLayout();
        }
Exemplo n.º 2
0
        private void loadInventory()
        {
            cmbInventory.Items.Clear();

            List <clsInventory> list = new List <clsInventory>();

            clsInventory inventoryClass = new clsInventory();

            list = inventoryClass.getList();

            foreach (clsInventory oInventory in list)
            {
                clsComboboxItem oItem = new clsComboboxItem();
                oItem.Text  = "[" + oInventory.TrackingCode + "] " + oInventory.Car.Name;
                oItem.Value = oInventory;

                cmbInventory.Items.Add(oItem);
            }
        }