Foxtable(狐表)用户栏目专家坐堂 → [求助]在表属性能用,在项目属性里不管用


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

主题:[求助]在表属性能用,在项目属性里不管用

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


加好友 发短信
等级:幼狐 帖子:116 积分:813 威望:0 精华:0 注册:2016/6/6 16:33:00
[求助]在表属性能用,在项目属性里不管用  发帖心情 Post By:2016/7/14 8:50:00 [只看该作者]

怎么能在项目属性里用

Select e.DataCol.Name
    Case "第一次收益时间","人员姓名"
        If e.DataRow.IsNull("第一次收益时间") OrElse e.DataRow.IsNull("人员姓名") Then
            e.DataRow("人员编号") = Nothing
        Else
            Dim d As Date = e.DataRow("第一次收益时间")
            Dim y As Integer = d.Year
            Dim m As Integer = d.Month
            Dim Days As Integer = Date.DaysInMonth(y,m)
            Dim fd As Date = New Date(y,m,1) '获得该月的第一天
            Dim ld As Date = New Date(y,m,Days) '获得该月的最后一天
            Dim bh As String = e.DataRow("人员姓名") & "-" & Format(d,"yyMMdd") & "-"

            If e.DataRow("人员编号").StartsWith(bh) = False 
                Dim max As String
                Dim idx As Integer
                Dim flt As String
                flt = "人员姓名 = '"& e.DataRow("人员姓名") & "' And 第一次收益时间 >= #" & fd & "# And 第一次收益时间 <= #" & ld & "# And [_Identify] <> " & e.DataRow("_Identify")
                max = e.DataTable.Compute("Max(人员编号)",flt) 

                If max > "" Then '如果存在最大单据编号
                    idx = CInt(max.Substring(12,4)) + 1 
                Else
                    idx = 1 
                End If
                e.DataRow("人员编号") = bh & Format(idx,"0000")
            End If
        End If
End Select


 回到顶部
总数 16 1 2 下一页