Foxtable(狐表)用户栏目专家坐堂 → 跨表引用


  共有2167人关注过本帖平板打印复制链接

主题:跨表引用

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


加好友 发短信
等级:幼狐 帖子:176 积分:1353 威望:0 精华:0 注册:2014/3/27 14:28:00
跨表引用  发帖心情 Post By:2014/8/26 12:42:00 [只看该作者]

If e.Col.IsNumeric AndAlso e.Col.Name  <> "总分" Then
    If e.Row.IsNull(e.Col.Name) = False
        If e.Row(e.Col.Name) < 60 Then
            DataTables("学生成绩").AddUserStyle("红牌", Color.Red, Color.DarkSlateGray)
            e.Style = "红牌"    

        Else If e.Row(e.Col.Name) > 90  Then
            DataTables("学生成绩").AddUserStyle("绿牌",Color.FromARGB(0, 192, 0), Color.DarkSlateGray)          
            e.Style = "绿牌"
        End If
    End If
End If

 把上面代码改成,引用 学生成绩等级 表 合格或优秀列数值


If e.Col.IsNumeric AndAlso e.Col.Name  <> "总分" Then
    If e.Row.IsNull(e.Col.Name) = False
        If e.Row(e.Col.Name) <  DataTables("学生成绩等级").Compute("合格","学期 = '" & e.DataRow("学期") & "' And 班级 = '" & e.DataRow("班级") & "'  ") Then
            DataTables("学生成绩").AddUserStyle("红牌", Color.Red, Color.DarkSlateGray)
            e.Style = "红牌"    

        Else If e.Row(e.Col.Name) > DataTables("学生成绩等级").Compute("优秀","学期 = '" & e.DataRow("学期") & "' And 班级 = '" & e.DataRow("班级") & "'  ") Then           

       DataTables("学生成绩").AddUserStyle("绿牌",Color.FromARGB(0, 192, 0), Color.DarkSlateGray)          
            e.Style = "绿牌"
        End If
    End If
End If

 

把< 60改成  DataTables("学生成绩等级").Compute("合格","学期 = '" & e.DataRow("学期") & "' And 班级 = '" & e.DataRow("班级") & "'  ")

 

这个代码是错误的,应怎么改?请指点  谢谢!

[此贴子已经被作者于2014-8-26 13:08:17编辑过]

 回到顶部