public GestaoOficina() { InitializeComponent(); RealStandAM__ = new RealStandAMmodelContainer(); listBoxCLientes.DataSource = RealStandAM__.ClienteSet.ToList(); }
public GestaoCliente() { InitializeComponent(); Standreal = new RealStandAMmodelContainer(); (from Cliente in Standreal.ClienteSet orderby Cliente.Nome select Cliente).Load(); clienteBindingSource.DataSource = Standreal.ClienteSet.Local.ToBindingList(); }
private void buttonFiltrar_Click(object sender, EventArgs e) { if (textBoxFilter.Text.Length > 0) { bindingNavigatorAddNewItem.Enabled = false; Standreal.Dispose(); Standreal = new RealStandAMmodelContainer(); (from cliente in Standreal.ClienteSet where cliente.Nome.ToUpper().Contains(textBoxFilter.Text.ToUpper()) orderby cliente.Nome select cliente).ToList(); clienteBindingSource.DataSource = Standreal.ClienteSet.Local.ToBindingList(); } else { bindingNavigatorAddNewItem.Enabled = true; Standreal.Dispose(); Standreal = new RealStandAMmodelContainer(); (from cliente in Standreal.ClienteSet orderby cliente.Nome select cliente).Load(); clienteBindingSource.DataSource = Standreal.ClienteSet.Local.ToBindingList(); } }
//Iniciar o Gestor private void GestaoOficina_Load(object sender, EventArgs e) { RealStandAM__ = new RealStandAMmodelContainer(); LerDados(); }