Пример #1
0
        private void GtCOGE_TotalToBeCalculated(object sendername, EventArgs e)
        {
            if (((string)sendername).Split('_').Count() < 2)
            {
                return;
            }

            string idcolumn = ((string)sendername).Split('_')[1];
            string idrow    = ((string)sendername).Split('_')[2];

            if (idcolumn == "3" || idcolumn == "2" || idcolumn == "5")
            {
                double saldocontabile = 0.0;
                double saldoec        = 0.0;
                double riconciliato   = 0.0;

                double.TryParse(gtRiconciliazioni.GetValue("2", idrow), out saldocontabile);
                double.TryParse(gtRiconciliazioni.GetValue("3", idrow), out saldoec);
                double.TryParse(gtRiconciliazioni.GetValue("5", idrow), out riconciliato);

                double differenza             = 0.0;
                double importoconriconciliato = 0.0;

                differenza = saldocontabile - saldoec;
                gtRiconciliazioni.SetValue("4", idrow, cBusinessObjects.ConvertNumber(differenza.ToString()));

                importoconriconciliato = saldocontabile - saldoec - riconciliato;
                gtRiconciliazioni.SetValue("6", idrow, cBusinessObjects.ConvertNumber(importoconriconciliato.ToString()));
            }
        }
Пример #2
0
        private void GtCOGE_TotalToBeCalculated(object sendername, EventArgs e)
        {
            if (((string)sendername).Split('_').Count() < 2)
            {
                return;
            }

            string idcolumn = ((string)sendername).Split('_')[1];
            string idrow    = ((string)sendername).Split('_')[2];

            if (idcolumn == "3" || idcolumn == "4")
            {
                double importocoge = 0.0;
                double importof24  = 0.0;
                double delta       = 0.0;

                double.TryParse(gtCOGE.GetValue("3", idrow), out importocoge);
                double.TryParse(gtCOGE.GetValue("4", idrow), out importof24);

                delta = importocoge - importof24;
                if (cBusinessObjects.ConvertNumber(delta.ToString()) != "")
                {
                    gtCOGE.SetValue("5", idrow, cBusinessObjects.ConvertNumber(delta.ToString()));
                }
                else
                {
                    gtCOGE.SetValue("5", idrow, "0");
                }
            }
        }
        private void GtCassaContante_TotalToBeCalculated(object sendername, EventArgs e)
        {
            if (((string)sendername).Split('_').Count() < 2)
            {
                return;
            }

            string idcolumn = ((string)sendername).Split('_')[1];
            string idrow    = ((string)sendername).Split('_')[2];

            if (idcolumn == "0" || idcolumn == "1")
            {
                double unitario    = 0.0;
                double numeropezzi = 0.0;
                double euro        = 0.0;

                double.TryParse(gtCassaContante.GetValue("1", idrow), out unitario);
                double.TryParse(gtCassaContante.GetValue("0", idrow), out numeropezzi);

                euro = unitario * numeropezzi;

                gtCassaContante.SetValue("2", idrow, cBusinessObjects.ConvertNumber(euro.ToString()));
            }

            GenerateTotal();
        }
Пример #4
0
        private void GtCOGE_TotalToBeCalculated_Intrernal()
        {
            for (int i = 0; i < gtCOGE.row; i++)
            {
                double previste    = 0.0;
                double effettive   = 0.0;
                double scostamento = 0.0;
                double percentuale = 0.0;

                double.TryParse(gtCOGE.GetValue("2", i.ToString()), out previste);
                double.TryParse(gtCOGE.GetValue("3", i.ToString()), out effettive);

                scostamento = effettive - previste;
                percentuale = ((previste != 0) ? (effettive - previste) / previste * 100.0 : 0);

                gtCOGE.SetValue("4", i.ToString(), ConvertNumber(scostamento.ToString()));
                gtCOGE.SetValue("5", i.ToString(), ConvertNumberWithDecimal(percentuale.ToString()));
            }
        }
        private void GtCOGE_TotalToBeCalculated(object sendername, EventArgs e)
        {
            if (((string)sendername).Split('_').Count() < 2)
            {
                return;
            }

            string idcolumn = ((string)sendername).Split('_')[1];
            string idrow    = ((string)sendername).Split('_')[2];

            if (idcolumn == "2" || idcolumn == "3")
            {
                double previste    = 0.0;
                double effettive   = 0.0;
                double scostamento = 0.0;

                double.TryParse(gtISQC_Incaricati.GetValue("2", idrow), out previste);
                double.TryParse(gtISQC_Incaricati.GetValue("3", idrow), out effettive);

                scostamento = effettive - previste;

                gtISQC_Incaricati.SetValue("4", idrow, ConvertNumber(scostamento.ToString()));
            }
        }