public void recalculateTotal()
        {
            txtTotale.Text = gtCompensoRevisione.GenerateSpecificTotal("4");

            if (txtTotale.Text == "")
            {
                txtTotale.Text = gtCompensoRevisione.GenerateSpecificTotal("3");
                if (txtTotale.Text == "")
                {
                    txtTotale.Text = (Convert.ToDouble(0)).ToString();
                }
            }

            if (txtTariffaOraria.Text == "")
            {
                txtTariffaOraria.Text = (Convert.ToDouble(0)).ToString();
            }

            txtCompenso.Text      = (Convert.ToDouble(txtTotale.Text) * ((txtTariffaOraria.Text == "") ? Convert.ToDouble(0) : Convert.ToDouble(txtTariffaOraria.Text))).ToString();
            txtTariffaOraria.Text = cBusinessObjects.ConvertNumber(txtTariffaOraria.Text);
            txtCompenso.Text      = cBusinessObjects.ConvertNumber(txtCompenso.Text);
        }
Exemple #2
0
        private void GenerateTotal()
        {
            txtTotaleComplessivo.Text = gtCassaContante.GenerateSpecificTotal("2");

            double saldo = 0.0;

            double.TryParse(txtSaldoSchedaContabile.Text, out saldo);

            double totale = 0.0;

            double.TryParse(txtTotaleComplessivo.Text, out totale);

            txtDifferenza.Text = cBusinessObjects.ConvertNumber((totale - saldo).ToString());
        }
Exemple #3
0
        private void GenerateTotal()
        {
            txtTotaleComplessivo.Text = gtCassaContante.GenerateSpecificTotal("2");

            double totale = 0.0;

            double.TryParse(txtTotaleComplessivo.Text, out totale);

            double tassocambio = 0.0;

            double.TryParse(txtTassoDiCambio.Text, out tassocambio);

            txtControvaloreInEuro.Text = cBusinessObjects.ConvertNumber((totale * tassocambio).ToString());

            double saldo = 0.0;

            double.TryParse(txtSaldoSchedaContabile.Text, out saldo);

            txtDifferenza.Text = cBusinessObjects.ConvertNumber(((totale * tassocambio) - saldo).ToString());
            foreach (DataRow dtrow in dati.Rows)
            {
                if (dtrow["CreditoEsistente"].ToString() == ((TabItem)(tabControl.SelectedItem)).Header.ToString())
                {
                    if (!String.IsNullOrEmpty(txtTotaleComplessivo.Text))
                    {
                        dtrow["txtTotaleComplessivo"] = txtTotaleComplessivo.Text;
                    }
                    if (!String.IsNullOrEmpty(txtDifferenza.Text))
                    {
                        dtrow["txtDifferenza"] = txtDifferenza.Text;
                    }
                    if (!String.IsNullOrEmpty(txtSaldoSchedaContabile.Text))
                    {
                        dtrow["txtSaldoSchedaContabile"] = txtSaldoSchedaContabile.Text;
                    }
                    if (!String.IsNullOrEmpty(txtTassoDiCambio.Text))
                    {
                        dtrow["txtTassoDiCambio"] = txtTassoDiCambio.Text;
                    }
                    if (!String.IsNullOrEmpty(txtControvaloreInEuro.Text))
                    {
                        dtrow["txtControvaloreInEuro"] = txtControvaloreInEuro.Text;
                    }
                }
            }
        }
Exemple #4
0
        private void GenerateGrandTotal()
        {
            double totale = 0.0;

            double.TryParse(gtCassaValoriBollati.GenerateSpecificTotal("2"), out totale);

            double totale2 = 0.0;

            double.TryParse(gtCassaValoriBollati2.GenerateSpecificTotal("2"), out totale2);

            txtTotaleComplessivo.Text = cBusinessObjects.ConvertNumber((totale + totale2).ToString());

            double saldo = 0.0;

            double.TryParse(txtSaldoSchedaContabile.Text, out saldo);

            txtDifferenza.Text = cBusinessObjects.ConvertNumber((totale + totale2 - saldo).ToString());
        }