Exemplo n.º 1
0
        private void cboModel_SelectedIndexChanged(object sender, EventArgs e)
        {
            var currentModelNo  = cboModel.Text;
            var selectedProduct = myShop.AccessData(currentModelNo);

            if (selectedProduct != null)
            {
                txtInventoryCode.Text = selectedProduct.Code.ToString();
            }
        }
Exemplo n.º 2
0
        private void cboModels_SelectedIndexChanged(object sender, EventArgs e)
        {
            var currentModelNo  = cboModels.Text;
            var selectedProduct = myShop.AccessData(currentModelNo);

            if (selectedProduct != null)
            {
                txtSalesCode.Text = selectedProduct.Code.ToString();
                txtPrice.Text     = selectedProduct.Price.ToString();
                txtWarranty.Text  = selectedProduct.Warranty.ToString();
                var display = selectedProduct.Quantity.ToString();
                lblDisplay.Text = "Available:" + display;
            }
        }