Пример #1
0
        public GestaoOficina()
        {
            InitializeComponent();

            RealStandAM__ = new RealStandAMmodelContainer();

            listBoxCLientes.DataSource = RealStandAM__.ClienteSet.ToList();
        }
Пример #2
0
        public GestaoCliente()
        {
            InitializeComponent();

            Standreal = new RealStandAMmodelContainer();

            (from Cliente in Standreal.ClienteSet
             orderby Cliente.Nome
             select Cliente).Load();
            clienteBindingSource.DataSource = Standreal.ClienteSet.Local.ToBindingList();
        }
Пример #3
0
 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();
     }
 }
Пример #4
0
 //Iniciar o Gestor
 private void GestaoOficina_Load(object sender, EventArgs e)
 {
     RealStandAM__ = new RealStandAMmodelContainer();
     LerDados();
 }