private void loadDgv(financials holder) { dgvDisplay.DataSource = holder.getDisplayItems(); dgvDisplay.RowHeadersVisible = false; dgvDisplay.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.Yellow; dgvDisplay.DefaultCellStyle.SelectionForeColor = System.Drawing.Color.Black; dgvDisplay.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dgvDisplay.AllowUserToAddRows = false; dgvDisplay.ClearSelection(); dgvDisplay.Columns["Total_Value"].DefaultCellStyle.Format = "c"; dgvDisplay.Columns["Total_Value"].Width = 120; }
private void setLabels(financials holder) { lbCount.Text = "Total # of selected items: " + holder.getCount(); lbTotal.Text = "Total value of selected items: " + holder.getTotal().ToString("c", new CultureInfo("en-US")); lbGrandTotal.Text = "Grand total parts and products: " + (parts.getTotal() + products.getTotal()).ToString("c", new CultureInfo("en-US")); }
//bool isProductSelected = false; private void financialForm_Load(object sender, EventArgs e) { parts = new financials(false); products = new financials(true); loadView(); }