예제 #1
0
 protected override void Pesquisar()
 {
     metroGrid1.AutoGenerateColumns = false;
     repositorio = new RepositorioMarca(new UnitOfWork());
     repositorio.ClearNotifications();
     metroGrid1.DataSource = null;
     metroGrid1.DataSource = repositorio.Get(p => p.Nome.Contains(txtBusca.Text));
     LblTotal.Text         = "Total: " + metroGrid1.RowCount.ToString();
     if (repositorio.IsInvalid())
     {
         foreach (var msg in repositorio.Notifications)
         {
             MessageBox.Show("ERRO", msg.Message, MessageBoxButtons.OK);
         }
     }
 }