01.
public
static
DateTime NextM(DateTime dateT)
02.
{
03.
if
(dateT.Day != DateTime.DaysInMonth(dateT.Year, dateT.Month))
04.
{
05.
dateT = dateT.AddMonths(1);
06.
return
new
DateTime(dateT.Year, dateT.Month, DateTime.DaysInMonth(dateT.Year, dateT.Month));
07.
}
08.
else
09.
{
10.
dateT = dateT.AddDays(1).AddMonths(1).AddDays(-1);
11.
return
new
DateTime(dateT.Year, dateT.Month, DateTime.DaysInMonth(dateT.Year, dateT.Month));
12.
}
13.
}
14.
15.
public
void
GenTable()
16.
{
17.
string
STARTPAY_PERIOD = dsMain.DATA[0].STARTPAY_PERIOD;
18.
decimal
PERIOD_INSTALLMENT = dsMain.DATA[0].PERIOD_INSTALLMENT;
19.
decimal
PRINCIPAL_BALANCE = dsMain.DATA[0].PRINCIPAL_BALANCE;
20.
decimal
PERIOD_PAYMENT = dsMain.DATA[0].PERIOD_PAYMENT;
21.
decimal
CONTINT_RATE = dsMain.DATA[0].CONTINT_RATE;
22.
decimal
INT_RATE = (CONTINT_RATE / 100);
23.
decimal
prnpay_amt = 0;
24.
decimal
intpay_amt = 0;
25.
int
intday = 0;
26.
27.
DateTime dateT = DateTime.ParseExact(STARTPAY_PERIOD,
"yyyyMM"
, WebUtil.TH);
28.
dateT =
new
DateTime(dateT.Year, dateT.Month, DateTime.DaysInMonth(dateT.Year, dateT.Month));
29.
decimal
an_year = dsMain.DATA[0].an_year;