Exemple #1
0
        public void DepositCommand_Executed(object sender)
        {
            if (!Deposit.HasValue)
            {
                MessageBox.Show("Manca l'importo del prelievo");
                return;
            }

            _contoData.CashFlowAdd(new CashFlow
            {
                Cash         = Math.Abs(Deposit.Value),
                FlowDate     = DepositDate,
                Description  = "Prelievo per cassa",
                CashFlowType = "Deposit"
            });

            Deposit     = null;
            DepositDate = DateTime.Today;

            if (GridFilterSelectedYear.HasValue && GridFilterSelectedMonth.HasValue)
            {
                UpdateList(GridFilterSelectedYear.Value, GridFilterSelectedMonth.Value);
            }

            AppProperties.FormHaveModifications = false;
        }
Exemple #2
0
        public void AddWithdrawCommand_Executed(object sender)
        {
            if (Withdraw > 0)
            {
                _contoData.CashFlowAdd(new CashFlowDataObject
                {
                    Cash        = Withdraw,
                    Description = "Prelievo per cassa",
                    FlowDate    = WithdrawDate,
                });

                Balance      = _contoData.CashFlowBalance();
                Withdraw     = 0;
                WithdrawDate = DateTime.Now;
            }
            else
            {
                MessageBox.Show("Immettere un valore di prelievo");
            }
        }