Galera, estou tentando criar um sistema de imposto pessoal, criei ele certinho, porém, quando vou criar o if/else ele tá erro,
A idéia é a seguinte:
Se o valor for > 1000 o imposto cobrado será de 15%, e se for menor que 1000 será de 10%.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void bd_impBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.bd_impBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.impostodbDataSet);
}
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'impostodbDataSet.bd_imp' table. You can move, or remove it, as needed.
this.bd_impTableAdapter.Fill(this.impostodbDataSet.bd_imp);
}
private void códigoTextBox_TextChanged(object sender, EventArgs e)
{
}
private void valorTextBox_TextChanged(object sender, EventArgs e)
{
}
private void impostoTextBox_TextChanged(object sender, EventArgs e)
{
}
[color=red] private void button1_Click(object sender, EventArgs e)
{
if (impostoTextBox.Text > 1000)
{
this.impostoTextBox.Text = "" + this.valorTextBox.Text;
}[/color]
}
}
}