public void Editar() { try { var datos = new categoriaproducto { id = Convert.ToInt32(lblid.Text), clave = txtClaveInterna.Text, Categoria = txtNombreCategoria.Text, Descripcion = txtDescripcionCategoria.Text }; MessageBox.Show(CategoriaData.Editar(datos)); Refrescar(); } catch (Exception esException) { MessageBox.Show(esException.Message); } }
//Método para Guardar datos public void Guardar() { try { var datos = new categoriaproducto { clave = txtClaveInterna.Text, Categoria = txtNombreCategoria.Text, Descripcion = txtDescripcionCategoria.Text }; MessageBox.Show(CategoriaData.Nuevo(datos)); } catch (Exception esException) { MessageBox.Show(esException.Message); } }