Exemplo n.º 1
0
        private void txtEsercizioImpegno_Leave(object sender, EventArgs e)
        {
            HelpForm.FormatLikeYear(txtEsercizioImpegno);
            if (Meta.IsEmpty)
            {
                return;
            }
            DataRow Curr = DS.csa_contracttaxepexp.Rows[0];

            if (Curr["idepexp"] != DBNull.Value)
            {
                if (txtEsercizioImpegno.Text.Trim() == "")
                {
                    txtNumImpegno.Text = "";
                    DS.epexpview.Clear();
                    Curr["idepexp"] = DBNull.Value;
                }
                else
                {
                    int newYmov = CfgFn.GetNoNullInt32(txtEsercizioImpegno.Text.Trim());
                    int oldYmov = newYmov;
                    if (DS.epexpview.Rows.Count > 0)
                    {
                        oldYmov = CfgFn.GetNoNullInt32(DS.epexpview.Rows[0]["yepexp"]);
                    }
                    if (oldYmov != newYmov)
                    {
                        txtNumImpegno.Text = "";
                        DS.epexpview.Clear();
                        Curr["idepexp"] = DBNull.Value;
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void txtEserc_Leave(object sender, EventArgs e)
        {
            HelpForm.FormatLikeYear(txtEserc);
            if (Meta.IsEmpty)
            {
                return;
            }
            DataRow Curr = DS.csa_contracttaxexpense.Rows[0];

            if (Curr["idexp"] != DBNull.Value)
            {
                if (txtEserc.Text.Trim() == "")
                {
                    txtNum.Text = "";
                    DS.expenseview.Clear();
                    Curr["idexp"] = DBNull.Value;
                }
                else
                {
                    int oldYmov = CfgFn.GetNoNullInt32(DS.expenseview.Rows[0]["ymov"]);
                    int newYmov = CfgFn.GetNoNullInt32(txtEserc.Text.Trim());
                    if (oldYmov != newYmov)
                    {
                        txtNum.Text = "";
                        DS.expenseview.Clear();
                        Curr["idexp"] = DBNull.Value;
                    }
                }
            }
        }
Exemplo n.º 3
0
        private void txtEserc_Leave(object sender, EventArgs e)
        {
            HelpForm.FormatLikeYear(txtEserc);
            if (_controller.IsEmpty)
            {
                return;
            }
            var curr = DS.csa_contractexpense.Rows[0];

            if (curr["idexp"] == DBNull.Value)
            {
                return;
            }
            if (txtEserc.Text.Trim() == "")
            {
                txtNum.Text = "";
                DS.expenseview.Clear();
                curr["idexp"] = DBNull.Value;
            }
            else
            {
                var oldYmov = CfgFn.GetNoNullInt32(DS.expenseview.Rows[0]["ymov"]);
                var newYmov = CfgFn.GetNoNullInt32(txtEserc.Text.Trim());
                if (oldYmov == newYmov)
                {
                    return;
                }
                txtNum.Text = "";
                DS.expenseview.Clear();
                curr["idexp"] = DBNull.Value;
            }
        }
Exemplo n.º 4
0
 private void FormattaDataDelTexBox(TextBox TB)
 {
     if (!TB.Modified)
     {
         return;
     }
     HelpForm.FormatLikeYear(TB);
 }
Exemplo n.º 5
0
        private void txtEserc_Leave(object sender, EventArgs e)
        {
            HelpForm.FormatLikeYear(txtEserc);
            if (_controller.IsEmpty)
            {
                return;
            }
            if (_controller.ErroreIrrecuperabile)
            {
                return;
            }
            if (!_controller.DrawStateIsDone)
            {
                return;
            }
            var curr = DS.csa_contract_partition.Rows[0];

            if (curr["idexp"] == DBNull.Value)
            {
                return;
            }
            if (txtEserc.Text.Trim() == "")
            {
                txtNum.Text = "";
                DS.expenseview.Clear();
                curr["idexp"] = DBNull.Value;
            }
            else
            {
                if (DS.epexpview.Rows.Count == 0)
                {
                    return;
                }
                var oldYmov = CfgFn.GetNoNullInt32(DS.expenseview.Rows[0]["ymov"]);
                var newYmov = CfgFn.GetNoNullInt32(txtEserc.Text.Trim());
                if (oldYmov == newYmov)
                {
                    return;
                }
                txtNum.Text = "";
                DS.expenseview.Clear();
                curr["idexp"] = DBNull.Value;
            }
        }
Exemplo n.º 6
0
        private void txtEsercizioImpegno_Leave(object sender, EventArgs e)
        {
            HelpForm.FormatLikeYear(txtEsercizioImpegno);
            if (_controller.destroyed || _controller.isClosing)
            {
                return;
            }
            if (_controller.IsEmpty || DS.csa_contract_partition.Rows.Count == 0)
            {
                return;
            }
            DataRow Curr = DS.csa_contract_partition.Rows[0];

            if (Curr["idepexp"] != DBNull.Value)
            {
                if (txtEsercizioImpegno.Text.Trim() == "")
                {
                    txtNumImpegno.Text = "";
                    DS.epexpview.Clear();
                    Curr["idepexp"] = DBNull.Value;
                }
                else
                {
                    if (DS.expenseview.Rows.Count > 0)
                    {
                        int oldYmov = CfgFn.GetNoNullInt32(DS.epexpview.Rows[0]["yepexp"]);
                        int newYmov = CfgFn.GetNoNullInt32(txtEsercizioImpegno.Text.Trim());
                        if (oldYmov != newYmov)
                        {
                            txtNumImpegno.Text = "";
                            DS.epexpview.Clear();
                            Curr["idepexp"] = DBNull.Value;
                        }
                    }
                    else
                    {
                        txtNumImpegno.Text = "";
                        Curr["idepexp"]    = DBNull.Value;
                    }
                }
            }
        }
Exemplo n.º 7
0
 private void txtEserc_Leave(object sender, EventArgs e)
 {
     HelpForm.FormatLikeYear(txtEserc);
     if (idexp != DBNull.Value)
     {
         if (txtEserc.Text.Trim() == "")
         {
             txtNum.Text = "";
             idexp       = DBNull.Value;
         }
         else
         {
             int newYmov = CfgFn.GetNoNullInt32(txtEserc.Text.Trim());
             if (oldYmov != newYmov)
             {
                 txtNum.Text = "";
                 idexp       = DBNull.Value;
             }
         }
     }
 }
Exemplo n.º 8
0
 private void txtEsercizio_Leave(object sender, EventArgs e)
 {
     HelpForm.FormatLikeYear(txtEsercizio);
 }
Exemplo n.º 9
0
        private void txtEsercizio_Leave(object sender, EventArgs e)
        {
            TextBox TSender = (TextBox)sender;

            HelpForm.FormatLikeYear(TSender);
        }