Foxtable(狐表)用户栏目专家坐堂 → 字符转整数


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

主题:字符转整数

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


加好友 发短信
等级:二尾狐 帖子:573 积分:2961 威望:0 精华:0 注册:2016/10/27 14:33:00
  发帖心情 Post By:2016/11/24 12:30:00 [显示全部帖子]

Dim d As Date = Date.Today
Dim XQ As String
If d.Month >= 5 And d.Month <=11 Then
    XQ = d.Year & "年秋季"
Else If d.Month = 12 Then
    XQ = (d.Year+1) & "年春季"
Else If d.Month < 5 Then
    XQ = d.Year & "年春季"
End If

Dim kbs() As String = {"学费","餐费","车费"}
Dim bts() As String = {"学费","餐费","车费"}
For j As Integer = 0 To kbs.Length - 1
    Dim kb As String = e.Form.Controls(kbs(j)).Text
    Dim bt As String = e.Form.Controls(bts(j)).Name
    If kb> "" Then
        DataTables("缴费标准").deletefor("学期 = '"& XQ &"' And 缴费项目 = '"& bt &"'")
       
        Dim idx As Integer = Tables("缴费标准").Rows.Count
        Tables("缴费标准").AddNew(4)
        Dim dr As Row
        For i As Integer = idx To Tables("缴费标准").Rows.Count - 1
            dr = Tables("缴费标准").Rows(i)
            dr("学期") = XQ
            dr("缴费项目") = bt
            dr("月份")  = format(i-idx+1)+2
           
            If dr("月份") = 3 Then
                dr("缴费金额") = e.Form.Controls(kbs(j)).Text
            End If
            If dr("月份") = 4 Then
                dr("缴费金额") = e.Form.Controls(kbs(j)).Text*0.75
            End If
            If dr("月份") = 5 Then
                dr("缴费金额") = e.Form.Controls(kbs(j)).Text*0.5
            End If
            If dr("月份") = 6 Then
                dr("缴费金额") = e.Form.Controls(kbs(j)).Text*0.25
            End If
           
        Next
    End If
Next


 回到顶部