Foxtable(狐表)用户栏目专家坐堂 → 求高手解答


  共有2477人关注过本帖树形打印复制链接

主题:求高手解答

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/11/3 21:20:00 [显示全部帖子]

参考代码

 

Dim A As Double = 10000
Dim fh As Double = 0
Dim sum As Double = 0
For i As Integer = 0 To 20
    If sum Mod 10000 = 0 Then
        fh = (A + sum) * 0.1
    End If
    sum += fh
    output.show(i+1 & " 返还 " & sum)
Next


 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/11/3 22:04:00 [显示全部帖子]

Select Case e.DataCol.name
    Case "交款日期"
        If e.DataRow.IsNull("交款日期") Then
            e.DataRow("年") = Nothing
            e.DataRow("月") = Nothing
        Else
            Dim y,m,d As Integer
            DateYMD(e.DataRow("交款日期"),Date.Today,y,m,d)
            e.DataRow("年") = y
            e.DataRow("月") = m
           
            Dim A As Double = e.DataRow("交款金额")
            Dim fh As Double = 0
            Dim sum As Double = 0
            For i As Integer = 0 To y*12+m-1
                If sum Mod 10000 = 0 Then
                    fh = (A + sum) * 0.1
                End If
                sum += fh
            Next
            e.DataRow("累计返券") = sum
        End If
End Select

 回到顶部