以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  Nothing显示  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=174271)

--  作者:qazlinle6
--  发布时间:2022/1/8 16:46:00
--  Nothing显示
  For Each a当天 As String In dt当天.getvalues("业绩店名")
        
   If ddr IsNot Nothing AndAlso ddr("Group") ="店长" 
Dim aaa01 As Double = dt当天.compute("sum(提成业绩)" ,"业绩店名=\'" & a当天  & "\' " )
                .AddTitle("h02"," <a href=""当天业绩.htm""> <i> <button style=\'height:40px;width:30%;border-style: none none none none;width: 32.5%; top: 39.4%;\'>当天业绩<br>"& aaa01 & "</button></i></a>")
End If 



如果 dt当天.getvalues("业绩店名")是空的就显示下面这段代码
                \'.AddTitle("h02"," <a href=""当天业绩.htm""> <i> <button style=\'height:40px;width:30%;border-style: none none none none;width: 32.5%; top: 39.4%;\'>当天业绩<br>0</button></i></a>")



--  作者:有点蓝
--  发布时间:2022/1/8 16:55:00
--  
dim lst as list(of string) = dt当天.getvalues("业绩店名")
if lst.count => 0 then
循环的代码
else
显示dt当天.getvalues("业绩店名")是空的代码
end if

--  作者:qazlinle6
--  发布时间:2022/1/8 18:01:00
--  
Dim lst As List(of String) = dt当天.getvalues("业绩店名")
If lst IsNot Nothing Then

For Each a当天 As String In dt当天.getvalues("业绩店名")
        
   If ddr IsNot Nothing AndAlso ddr("Group") ="店长"
Dim aaa01 As Double = dt当天.compute("sum(提成业绩)" ,"业绩店名=\'" & a当天  & "\' " )
                .AddTitle("h02"," <a href=""当天业绩.htm""> <i> <button style=\'height:40px;width:30%;border-style: none none none none;width: 32.5%; top: 39.4%;\'>当天业绩<br>"& aaa01 & "</button></i></a>")
End If
If ddr IsNot Nothing AndAlso ddr("Group") ="员工"
                Dim aaa02 As Double = dt当天.compute("sum(提成主销业绩)" ,"业绩店名=\'" & a当天  & "\'And  身份证姓名 = \'" & e.Cookies("username") & "\' " )
                Dim aaa03 As Double = dt当天.compute("sum(提成副销业绩)" ,"业绩店名=\'" & a当天  & "\'And  身份证姓名2 = \'" & e.Cookies("username") & "\' " )
            .AddTitle("h02"," <i> <button style=\'height:40px;width:30%;border-style: none none none none;width: 32.5%; top: 39.4%;\'>当天业绩<br>"& aaa02+aaa03 & "</button></i>")

 End If
Next


Else
 .AddTitle("h02"," <a href=""当天业绩.htm""> <i> <button style=\'height:40px;width:30%;border-style: none none none none;width: 32.5%; top: 39.4%;\'>当天业绩<br>0</button></i></a>")
End If




没用
[此贴子已经被作者于2022/1/8 18:23:45编辑过]

--  作者:有点蓝
--  发布时间:2022/1/9 20:02:00
--  
判断是否有值的方法看2楼。既然不喜欢使用我们回复的用法,又何必问!如果觉得我们回复的用法有问题,请测试后指出具体的问题