示例#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;
                    }
                }
            }
        }
示例#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;
                    }
                }
            }
        }
示例#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;
            }
        }
示例#4
0
 private void FormattaDataDelTexBox(TextBox TB)
 {
     if (!TB.Modified)
     {
         return;
     }
     HelpForm.FormatLikeYear(TB);
 }
示例#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;
            }
        }
示例#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;
                    }
                }
            }
        }
示例#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;
             }
         }
     }
 }
示例#8
0
 private void txtEsercizio_Leave(object sender, EventArgs e)
 {
     HelpForm.FormatLikeYear(txtEsercizio);
 }
示例#9
0
        private void txtEsercizio_Leave(object sender, EventArgs e)
        {
            TextBox TSender = (TextBox)sender;

            HelpForm.FormatLikeYear(TSender);
        }