使用半月计划创建日期

时间:2017-07-20 08:44:14

标签: vb.net

我创建了一个简单的Lending程序,可以生成MONTHLY付款模式。生成的时间表是4个周期,因此借款人应每月支付一次。刚刚显示的截图如下。 enter image description here

这是我的代码:

Private Sub GenerateScheule()

    Dim PrincipalAmount As Double = Me.tbPrincipalAmount.Text
    Dim InterestRate As Double = Me.tbInterestRate.Text
    Dim Period As Integer = Me.tbPeriod.Text
    Dim LoanDate As Date = Me.dtpLoanDate.Text
    Dim ModePayment As String = Me.cbModeOfPayment.Text

    Me.tbLastPayment.Text = LoanDate.AddMonths(Period)

    If cbModeOfPayment.Text = "Semi-Monthly" Then

        For i As Integer = 1 To Period

            Dim dtDate As Date = LoanDate.AddMonths(i)

             dgvLoanSchedule.Rows.Add(i, Format(dtDate, "MMM/dd/yyyy"))

        Next
    End If

现在我还要创建一个半月支付模式。如果借款人有4个期间,则可以达到8个期间,但是每半个月一次。刚刚在下面显示了截图。

请有人帮助我。我感谢您的帮助。谢谢你伙计。

enter image description here

0 个答案:

没有答案