Foxtable(狐表)用户栏目专家坐堂 → 求助


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

主题:求助

帅哥哟,离线,有人找我吗?
狐狸爸爸
  11楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47448 积分:251060 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2011/10/28 15:52:00 [只看该作者]

Select Case    e.DataCol.name
    Case "材质"
        Dim dr As DataRow = DataTables("厂标").Find("材质 = '" & e.NewVAlue & "'")
        If dr IsNot Nothing Then
            e.DataRow("镁_厂标")  = dr("镁")
            e.DataRow("铁_厂标")  = dr("铁")
            e.DataRow("硅_厂标")  = dr("硅")
            e.DataRow("钙_厂标")  = dr("钙")
        Else
            e.DataRow("镁_厂标")  = Nothing
            e.DataRow("铁_厂标")  = Nothing
            e.DataRow("硅_厂标")  = Nothing
            e.DataRow("钙_厂标")  = Nothing
        End If
    Case "镁_实测","硅_实测","钙_实测","铁_实测"
        Dim dr As DataRow = DataTables("厂标").Find("材质 = '" & e.DataRow("材质") & "'")
        If dr IsNot Nothing AndAlso e.newvalue Then
            Dim nm As String = e.DataCol.Name.SubString(0,1)
            Dim ov As String = dr(nm)
            If ov.IndexOf("-") > 0 Then
                Dim vls() As String = ov.split("-")
                Dim v1 As Double = vls(0)
                Dim v2 As Double = vls(1)
                If e.newvalue >= v1 AndAlso e.newvalue <= v2 Then
                    e.DataRow(nm & "_" & "厂标" ) = "合格"
                ElseIf e.newvalue < v1 Then
                    e.DataRow(nm & "_" & "厂标" ) = e.newvalue - v1
                Else
                    e.DataRow(nm & "_" & "厂标" ) = e.newvalue - v2
                End If
            Else
                Dim o As String = ov.SubString(0,1)
                Dim v As Double = val(ov.SubString(1))
                If o = ">" Then
                    If e.NewValue > v Then
                        e.DataRow(nm & "_" & "厂标" ) = "合格"
                    Else
                        e.DataRow(nm & "_" & "厂标" ) = v - e.newvalue
                    End If
                ElseIf o = "<"
                    If e.NewValue < v Then
                        e.DataRow(nm & "_" & "厂标" ) = "合格"
                    Else
                        e.DataRow(nm & "_" & "厂标" ) =  e.newvalue - v
                    End If
                ElseIf o = "≥" Then
                    If e.NewValue >= v Then
                        e.DataRow(nm & "_" & "厂标" ) = "合格"
                    Else
                        e.DataRow(nm & "_" & "厂标" ) = v - e.newvalue
                    End If
                ElseIf o = "≤"
                    If e.NewValue <= v Then
                        e.DataRow(nm & "_" & "厂标" ) = "合格"
                    Else
                        e.DataRow(nm & "_" & "厂标" ) =  e.newvalue - v
                    End If
                End If
            End If
        End If
End Select


 回到顶部
总数 11 上一页 1 2