//Filtra os clientes por nome private void buttonFiltrar_Click(object sender, EventArgs e) { if (textBoxfiltar.Text.Length > 0) { bindingNavigator1.AddNewItem.Enabled = false; myDb.Dispose(); myDb = new StandAutomoveisContainer(); (from cliente in myDb.Clientes where cliente.Nome.ToUpper().StartsWith(textBoxfiltar.Text.ToUpper()) orderby cliente.Nome select cliente).ToList(); dataGridView1.DataSource = myDb.Clientes.Local.ToBindingList(); } else { bindingNavigator1.AddNewItem.Enabled = true; myDb.Dispose(); myDb = new StandAutomoveisContainer(); (from cliente in myDb.Clientes orderby cliente.Nome select cliente).Load(); dataGridView1.DataSource = myDb.Clientes.Local.ToBindingList(); } }
public FormClientes() { InitializeComponent(); myDb = new StandAutomoveisContainer(); LerDados(); }
public FormAluguer() { InitializeComponent(); myDB = new StandAutomoveisContainer(); precoaluguer = 0.34f; total = 0f; }
public FormClientes() { InitializeComponent(); myDb = new StandAutomoveisContainer(); (from cliente in myDb.Clientes orderby cliente.Nome select cliente).Load(); clienteBindingSource.DataSource = myDb.Clientes.Local.ToBindingList(); bindingNavigator1.CountItem.Text = myDb.Clientes.Local.Count().ToString(); }
public FormAdicionarCliente() { InitializeComponent(); myDb = new StandAutomoveisContainer(); }
public FormVenda() { InitializeComponent(); myDb = new StandAutomoveisContainer(); }
public FormAdicionarCarroAluguer() { InitializeComponent(); myDB = new StandAutomoveisContainer(); }