Example #1
0
        private void ProductArrToForm(Product curProduct)
        {
            ProductArr productArr = new ProductArr();

            productArr.FillBuyAvailable();
            productArr.Sort();

            listbox_Cars.DataSource = productArr;

            if (productArr != null)
            {
                listbox_Cars.ValueMember   = "ID";
                listbox_Cars.DisplayMember = "FullModel";
            }

            if (curProduct != null)
            {
                listbox_Cars.SelectedValue = curProduct.Id;
            }
        }