Foxtable(狐表)用户栏目专家坐堂 → 发现一错误提示,不明原因


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

主题:发现一错误提示,不明原因

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


加好友 发短信
等级:五尾狐 帖子:1028 积分:7211 威望:0 精华:0 注册:2008/9/1 22:34:00
发现一错误提示,不明原因  发帖心情 Post By:2012/11/7 9:08:00 [只看该作者]


图片点击可在新窗口打开查看此主题相关图片如下:12.jpg
图片点击可在新窗口打开查看

 

代码如下:

 

 

Dim tbl As Table = Tables("自动录入_Table1")
If e.KeyCode = Keys.Up Then
    tbl.Position = tbl.Position - 1
    e.Cancel = True
ElseIf e.KeyCode = Keys.Down Then
    tbl.Position = tbl.Position + 1
    e.Cancel = True
ElseIf e.KeyCode = Keys.Enter Then
    If tbl.Current IsNot Nothing Then
        If e.Control = False Then
           ' Select Case "obas_part_spec"
                'Case "obas_part_spec"
                    For Each dr1 As DataRow In DataTables("授权表").Select("用户名 = '" & Vars("_UserName") & "'" )
                        If dr1("表名") = Tables("obas_part_spec").Name AndAlso dr1("只能编辑个人数据")=True Then
                            If Vars("_UserName") <> Tables("obas_part_spec").Current("user_no") Then
                                Messagebox.Show("你已经被限制只能编缉属于你自己的数据!,如有疑问,请与管理员联系","提示",MessageBoxButtons.OK, MessageBoxIcon.Information)
                            Else
                                Dim r2 As Row  = Tables("obas_part_spec").AddNew()
                                 Tables("obas_part_spec").Current("part_no") = tbl.Current("part_no")

                                'Tables("obas_part_spec").Current("part_no") = tbl.Current("part_no") '单行写入的代码
                                'Tables("obas_part_spec").Current("料品名称") = tbl.Current("料品名称")
                                'Tables("obas_part_spec").Current("料品规格") = tbl.Current("料品规格")
                                'Tables("obas_part_spec").Current("料品归类") = tbl.Current("料品归类")
                                'Tables("obas_part_spec").Current("库存单位") = tbl.Current("库存单位")
                              

                            End If
                        End If
                         If dr1("表名") = Tables("obas_part_spec").Name AndAlso dr1("只能编辑部门数据")=True Then
                           If Tables("obas_part_spec").Current.isnull("部门") Then
                                Return
                               
                            ElseIf dr1("部门范围").indexof( Tables("obas_part_spec").Current("部门")) < 0 Then
                               
                                Messagebox.Show("你已经被限制只能编缉属于你的部门数据!,如有疑问,请与管理员联系","提示",MessageBoxButtons.OK, MessageBoxIcon.Information)
                            Else
                                 Tables("obas_part_spec").AddNew()
                                 Tables("obas_part_spec").Current("part_no") = tbl.Current("part_no")

                                'Tables("obas_part_spec").Current("part_no") = tbl.Current("part_no") '单行写入的代码
                                'Tables("obas_part_spec").Current("料品名称") = tbl.Current("料品名称")
                                'Tables("obas_part_spec").Current("料品规格") = tbl.Current("料品规格")
                                'Tables("obas_part_spec").Current("料品归类") = tbl.Current("料品归类")
                                'Tables("obas_part_spec").Current("库存单位") = tbl.Current("库存单位")                               
                            End If
                        End If
                         If dr1("表名") = Tables("obas_part_spec").Name AndAlso dr1("只能编辑组数据")=True Then
                           If Tables("obas_part_spec").Current.isnull("org_no") Then
                                Return
                               
                            ElseIf dr1("可编辑组范围").indexof( Tables("obas_part_spec").Current("org_no")) < 0 Then
                               
                                Messagebox.Show("你已经被限制只能编缉属于你组名数据!,如有疑问,请与管理员联系","提示",MessageBoxButtons.OK, MessageBoxIcon.Information)
                            Else
                                Tables("obas_part_spec").AddNew()
                                Tables("obas_part_spec").Current("part_no") = tbl.Current("part_no") '单行写入的代码

                                'Dim r2 As Row  = Tables("obas_part_spec").AddNew()
                                'r2("part_no") ="123456"
                                'tbl.Current("part_no")

                                'Tables("obas_part_spec").Current("part_no") = tbl.Current("part_no") '单行写入的代码
                                'Tables("obas_part_spec").Current("料品名称") = tbl.Current("料品名称")
                                'Tables("obas_part_spec").Current("料品规格") = tbl.Current("料品规格")
                                'Tables("obas_part_spec").Current("料品归类") = tbl.Current("料品归类")
                                'Tables("obas_part_spec").Current("库存单位") = tbl.Current("库存单位")                               
                            End If
                        End If
                    Next
            'End Select
        Else
            For Each r1 As Row In Tables("自动录入_Table1").GetCheckedRows
                Dim r2 As Row  = Tables("obas_part_spec").AddNew()
                r2("part_no") = r1("part_no")
                'r2("料品名称") = r1("料品名称")
                'r2("料品归类") = r1("料品归类")
                'r2("料品规格") = r1("料品规格")
                'r2("库存单位") = r1("库存单位")
            Next
           
        End If
    End If
    e.Cancel = True
   e.Form.Close()
End If
If e.KeyCode = Keys.Escape
    e.Form.Close()
End If


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