示例#1
0
        /// <summary>
        /// 为贷款分析表填充数据
        /// </summary>
        protected void FillDebtDatagridViewAfterTimeNow()
        {
            dataTableAfterNow = new DataTable();
            debtAna.setTableStructure();
            dataTableAfterNow.Columns.AddRange(debtAna.dataColumns);
            leftsum = 0;
            int i    = 0;
            var time = DateTimeExtension.ReturnYearMonth(DateTime.Now);

            while (sumCapital < sumDebtAfterBigRepay * 1e4)
            {
                time = time.AddMonths(1);
                var row = dataTableAfterNow.NewRow();
                debtAna.setRowData(row, time);
                dataTableAfterNow.Rows.Add(row);
                sumCapital  += Double.Parse(row["本金(元)"].ToString());
                sumInterest += Double.Parse(row["利息(元)"].ToString());
                ++i;
                leftsum += Double.Parse(row["本息(元)"].ToString());
            }
        }