예제 #1
0
        private void btnCadastrar_Click(object sender, EventArgs e)
        {
            ProdutoTableAdapter taPessoa = new ProdutoTableAdapter();

            taPessoa.Insert(Convert.ToInt64(txtCodBarras.Text), txtDesc.Text, txtMarca.Text, txtEmbalagem.Text, txtTipo.Text, int.Parse(txtQuantid.Text), decimal.Parse(txtPreco.Text), txtFoto.Text);
            MessageBox.Show("Produto Cadastrado com sucesso!");
            Limpar_Caixa();
            txtCod.Text = taPessoa.UltimoCOD().ToString();
            this.Close();
        }