コード例 #1
0
        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);
            }
        }
コード例 #2
0
        //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);
            }
        }