Example #1
0
 private void BtnAdicionar_Click(object sender, EventArgs e)
 {
     modelo.Pizza         pizza        = new modelo.Pizza();
     servico.PizzaServico pizzaService = new servico.PizzaServico(pizzaDao);
     pizza.Sabor = Convert.ToString(tbxSabor1.Text);
     pizza.Valor = Convert.ToDecimal(tbxValor.Text);
     pizzaService.Adicionar(pizza);
     Limpar();
     dgwPizzas.DataSource = pizzaService.BuscarTodas();
 }
Example #2
0
 private void BtnBuscar_Click(object sender, EventArgs e)
 {
     servico.PizzaServico pizzaService = new servico.PizzaServico(pizzaDao);
     dgwPizzas.DataSource = pizzaService.BuscarTodas();
 }