Ejemplo n.º 1
0
        private void searchGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int selectedRow = e.RowIndex;

            // Get the selected row and material type
            quoteToShow = list[selectedRow];
            newMaterial = (DesktopMaterial)materialComboBox.SelectedItem;

            // Add the price difference between the two selections to the total
            int priceDiff = quoteToShow.changeMaterialCost(quoteToShow, newMaterial.ToString());

            quoteToShow.TotalCost        += priceDiff;
            quoteToShow.Desk.MaterialType = newMaterial;

            displaySearchQuoteButton.Enabled = true;
        }