//Functions---------------------------------------------------------------------------------- public void updateData(object sender, EventArgs e) { dgActiveQuotes.DataSource = null; Classes.DataAccess.SalesDataAccess db = new Classes.DataAccess.SalesDataAccess(); quotes = db.GetActiveQuotes(); dgActiveQuotes.DataSource = quotes; dgActiveQuotes.Columns["QuoteInactive"].Visible = false; dgActiveQuotes.Columns["POReceived"].Visible = false; dgActiveQuotes.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; dgActiveQuotes.Columns["QuoteComments"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; }
private void showActiveQuotes() { dgQuoteGrid.DataSource = null; Classes.DataAccess.SalesDataAccess db = new Classes.DataAccess.SalesDataAccess(); quotes = db.GetActiveQuotes(); UpdateBinding(); dgQuoteGrid.Columns["QuoteInactive"].Visible = false; dgQuoteGrid.Columns["POReceived"].Visible = false; dgQuoteGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; dgQuoteGrid.Columns["PartDescription"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; }
public void ShowActiveQuotes() { //Takes Care of Loading the DataGridView with all Active Quotes dgActiveQuotes.DataSource = null; Classes.DataAccess.SalesDataAccess db = new Classes.DataAccess.SalesDataAccess(); activeQuotes = db.GetActiveQuotes(); dgActiveQuotes.DataSource = activeQuotes; dgActiveQuotes.Columns["QuoteInactive"].Visible = false; dgActiveQuotes.Columns["POReceived"].Visible = false; dgActiveQuotes.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; dgActiveQuotes.Columns["QuoteComments"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; }