public Impuesto()
        {
            InitializeComponent();
            ObtenerId();
            DataSet102ATableAdapters.IngresosTableAdapter ta = new DataSet102ATableAdapters.IngresosTableAdapter();
            DataSet102A.IngresosDataTable dt  = ta.GetValor_Ingresos(Convert.ToInt32(lbId3.Text));
            DataSet102A.IngresosRow       row = (DataSet102A.IngresosRow)dt.Rows[0];
            DataSet102ATableAdapters.GastosTableAdapter tb = new DataSet102ATableAdapters.GastosTableAdapter();
            DataSet102A.GastosDataTable dt2  = tb.GetValor_Gastos(Convert.ToInt32(lbId3.Text));
            DataSet102A.GastosRow       rowg = (DataSet102A.GastosRow)dt2.Rows[0];
            txtIT.Text = (row.valor_ingresos.ToString());
            txtGT.Text = (rowg.valor_gastos.ToString());


            total           = decimal.Parse(txtIT.Text) - decimal.Parse(txtGT.Text);
            lbImpuesto.Text = total.ToString();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtRazonSocial.Text) || string.IsNullOrEmpty(txtRUC.Text))
            {
                MessageBox.Show("por favor ingrese la razón Social y el RUC");
                return;
            }
            IngresosTotales();
            DataSet102ATableAdapters.IngresosTableAdapter ta = new DataSet102ATableAdapters.IngresosTableAdapter();

            decimal total;

            total         = decimal.Parse(textBox3.Text) + decimal.Parse(textBox4.Text) + decimal.Parse(textBox5.Text) + decimal.Parse(textBox6.Text) + decimal.Parse(textBox7.Text) + decimal.Parse(textBox8.Text) + decimal.Parse(textBox9.Text) + decimal.Parse(textBox10.Text) + decimal.Parse(textBox11.Text);
            txtTotal.Text = total.ToString();
            try
            {
                ta.InsertIngresos(total, Convert.ToInt32(lbId.Text));
            }catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
        }