Example #1
0
 private void btnSalvar_Click(object sender, EventArgs e)
 {
     if (_categoria.Id == 0)
     {
         _categoria.Nome = txtCategoria.Text;
         _categoriaServico.Adicionar(_categoria);
     }
     else
     {
         _categoria.Nome = txtCategoria.Text;
         _categoriaServico.Atualiza(_categoria);
         this.Close();
     }
     Limpar();
 }