Esempio n. 1
0
 private void btnInserir_Click(object sender, EventArgs e)
 {
     if (txtNovoValor.Text == "")
     {
         MessageBox.Show("Insira um valor!");
     }
     else if (txtNovoValor.Text == "0")
     {
         MessageBox.Show("Insira um valor!");
     }
     else
     {
         ProdutoTableAdapter taProd = new ProdutoTableAdapter();
         taProd.UpdateValor(Convert.ToDecimal(valornovo), Convert.ToInt64(txtCodB.Text));
         MessageBox.Show("Valor Atualizado com sucesso!");
         txtCodB.Text      = "";
         txtDesc.Text      = "";
         txtNovoValor.Text = "";
         txtValor.Text     = "";
     }
 }