Example #1
0
        public void AtualizaFiltro()
        {
            GridFornecedor.AutoGenerateColumns = false;
            GridFornecedor.DataSource          = new SortableBindingList <Domain.Entity.Fornecedor>(_context
                                                                                                    .Fornecedores

                                                                                                    .Where(f => f.EmpresaId == (long)EditEmpresa.SelectedValue)
                                                                                                    .ToList());
            if (GridFornecedor.Rows.Count > 0)
            {
                GridFornecedor.Rows[0].Selected = true;
            }
            LbPesquisa.Text = GridFornecedor.Ordena(1);
        }
Example #2
0
 private void GridFornecedor_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     LbPesquisa.Text = GridFornecedor.Ordena(e.ColumnIndex);
     GridFornecedor.Pesquisa(EditPesquisa.Text, (CurrencyManager)BindingContext[GridFornecedor.DataSource]);
 }