Exemplo n.º 1
0
        private void DebtAnalysisDlg_Load(object sender, EventArgs e)
        {
            try
            {
                GlobalObject.GetGlobalDebtInstance();

                double finishedAmount = GlobalObject.Debt.FinishedPaymentSumAt(DateTime.Now);
                if (finishedAmount < 0)
                {
                    finishedAmount = 0;
                }
                double unfinishedAmount = GlobalObject.Debt.LeftDebtAt(DateTime.Now);
                if (unfinishedAmount < 0)
                {
                    unfinishedAmount = 0;
                }
                double finishedCapital = GlobalObject.Debt.FinishedCapitalSumAt(DateTime.Now);
                if (finishedCapital < 0)
                {
                    finishedCapital = 0;
                }
                double unfinishedCapital = GlobalObject.Debt.SumDebt - finishedCapital;
                if (unfinishedCapital <= 0)
                {
                    unfinishedCapital = 0;
                }
                double finishedInterest = GlobalObject.Debt.FinishedInterestSumAt(DateTime.Now);
                if (finishedInterest < 0)
                {
                    finishedInterest = 0;
                }
                double unfinishedInterest = GlobalObject.Debt.LeftInterestAt(DateTime.Now);
                if (unfinishedCapital <= 0 || unfinishedInterest < 0)
                {
                    unfinishedInterest = 0;
                }

                this.capInterTxt.Text = string.Format("{0} 元", Math.Round(finishedAmount * 1e4, 0));
                this.capTxt.Text      = string.Format("{0} 元", Math.Round(finishedCapital * 1e4, 0));
                this.interTxt.Text    = string.Format("{0} 元", Math.Round(finishedInterest * 1e4, 0));

                this.unPaidCapInterTxt.Text = string.Format("{0} 元", Math.Round(unfinishedAmount * 1e4, 0));
                this.unPaidCapTxt.Text      = string.Format("{0} 元", Math.Round(unfinishedCapital * 1e4, 0));
                this.unPaidInterTxt.Text    = string.Format("{0} 元", Math.Round(unfinishedInterest * 1e4, 0));
            }
            catch (Exception ex)
            {
                IMessageBox.ShowWarning(ex.Message);
            }
        }
Exemplo n.º 2
0
        // Load事件
        private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                GlobalObject.GetGlobalDebtInstance();
                debtAnal = new DebtAnalysis();

                var startPage = new StartPageForm();
                startPage.MdiParent = this;
                startPage.Dock      = DockStyle.Fill;
                startPage.Show();
            }
            catch (Exception ex)
            {
                IMessageBox.ShowWarning(ex.Message);
            }
        }
Exemplo n.º 3
0
        private void calcuBtn_Click(object sender, EventArgs e)
        {
            try
            {
                GlobalObject.GetGlobalDebtInstance();

                updateInterfaceImplemation();

                if (iearyDebt == null)
                {
                    IMessageBox.ShowWarning("请选择一种还款方式!");
                    return;
                }
                if (string.IsNullOrEmpty(planBigPayAmountTxt.Text))
                {
                    IMessageBox.ShowWarning("请填写计划还款金额!");
                    return;
                }

                if (DateTime.Parse(this.planBigRepayTimeDTP.Value.ToString("yyyy-MM-01")) < DateTime.Parse(DateTime.Now.ToString("yyyy-MM-01")))
                {
                    IMessageBox.ShowWarning("计划还贷时间早于当前时间!请设置一个以后的时间");
                    return;
                }

                detailTable = iearyDebt.Recalculate(Convert.ToDouble(planBigPayAmountTxt.Text));

                this.capInterTxt.Text = string.Format("{0} 元", (Math.Round(iearyDebt.LeftSumCapitalInterest, 2) * 1e4).ToString());
                this.capTxt.Text      = string.Format("{0} 元", (Math.Round(iearyDebt.LeftSumCapital, 2) * 1e4).ToString());
                this.interTxt.Text    = string.Format("{0} 元", (Math.Round(iearyDebt.LeftSumInterest, 2) * 1e4).ToString());
                double saveInter = GlobalObject.Debt.LeftInterestAt(DateTime.Now) - iearyDebt.LeftSumInterest;
                this.savedInterestTxt.Text = string.Format("{0} 元", (Math.Round(saveInter, 2) * 1e4).ToString());

                fillChart(this.chart1);
            }
            catch (Exception ex)
            {
                IMessageBox.ShowWarning(ex.Message);
            }
        }
Exemplo n.º 4
0
 private void EarlyPayDlg_Load(object sender, EventArgs e)
 {
     base.saveButton.Visible = false;
     setDefaultImplemation();
     GlobalObject.GetGlobalDebtInstance();
 }
Exemplo n.º 5
0
 /// <summary>
 /// 提前还贷处理前,都从配置信息重新构建贷款设置
 /// </summary>
 public BaseBigRepay()
 {
     GlobalObject.GetGlobalDebtInstance();
 }