以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=82222)

--  作者:9602084
--  发布时间:2016/3/14 9:22:00
--  [求助]
相同的代码,在2015版中正常执行,升级2016后,红色部分代执行不了,BIN目录清空也不行
forms("附属信息").Text= _cdckxz & "--" & Tables("基本信息").current("姓名") & "--" & Tables("基本信息").Current("档案编号")
Dim tblUser As Table = e.Form.Controls("Table1").Table
Dim strSQL As String="s elect * f rom {" & _cdckxz & "} where 身份证号码 =\'" & Tables("基本信息").current("身份证号码") & "\'"
\'msgbox(strSQL)
tblUser.Fill(strSQL,"rsgl",False)
MessageBox.show(_cdckxz)
MessageBox.show(tbluser.Rows.count)
If _cdckxz = "年度考核" Then
    If tbluser.Rows.Count > 0 Then
        e.Form.controls("Button1").Visible = False
    Else
        e.Form.controls("Button1").Visible = True
        e.Form.Controls("Button1").Left = 592
        e.Form.Controls("Button1").Top = 11
    End If
    e.Form.controls("Button3").Visible = False
    If Tables("基本信息").Current.Isnull("参加工作时间") = False Then
        Dim y As Integer = Tables("基本信息").Current("参加工作时间").year
        If y > 1993 Then
            For i As Integer = 1993 To y -1
                tbluser.Cols.Remove("年度" & i)
            Next
        End If
        
    End If
End If
tblUser.ExtendLastCol = True
tbluser.Cols.Remove("姓名") \'移除编辑者列,避免用户直接修改此列
tbluser.Cols.Remove("身份证号码") \'移除编辑者列,避免用户直接修改此列
tblUser.AllowEdit=True
Dim rgd As WinForm.RecordGrid = e.Form.Controls("RecordGrid1")
rgd.Table = Tables("附属信息_Table1") \'指定绑定表

rgd.Build() \'
Dim g = e.Form.Controls("RecordGrid1").Basecontrol
g.AutoSizeRows
g.styles.EmptyArea.BackColor = color.fromargb(231, 237, 243)  \'记录窗口空余地颜色背景
Tables("附属信息_Table1") .DataTable.SysStyles("EmptyArea").BackColor = Color.fromargb(231, 237, 243)
Vars("blnOpened")=True
Dim sp3 As WinForm.SplitContainer = e.Form.Controls("SplitContainer3")
Dim aa As WinForm.SplitPanel = sp3.Panel2
aa.basecontrol.backcolor= color.fromargb(231, 237, 243)
[此贴子已经被作者于2016/3/14 12:50:23编辑过]

--  作者:9602084
--  发布时间:2016/3/14 13:20:00
--  
自己顶一下

2016版,想说爱你,真的不容易

--  作者:9602084
--  发布时间:2016/3/14 13:24:00
--  

图片点击可在新窗口打开查看此主题相关图片如下:qq图片20160314132500.png
图片点击可在新窗口打开查看
图标用48*48的,不能自动适应,用32*32的,看着小家子气。2015版48*48的,自动适应,看着多丰满。

--  作者:Hyphen
--  发布时间:2016/3/14 13:32:00
--  
执行不了出现什么错误提示。具体是什么现象
--  作者:9602084
--  发布时间:2016/3/14 13:35:00
--  
在符合条件的情况下,什么提示都没有,直接跳过去了,
--  作者:9602084
--  发布时间:2016/3/14 13:36:00
--  
重新装回20151212版,一切正常
--  作者:9602084
--  发布时间:2016/3/14 13:37:00
--  
红色代码里加入msgbox,一个也不显示
--  作者:大红袍
--  发布时间:2016/3/14 16:44:00
--  
以下是引用9602084在2016/3/14 13:37:00的发言:
红色代码里加入msgbox,一个也不显示

 

这些弹出是否正常?不进入if判断,就说明值不对。

 

MessageBox.show(_cdckxz)
MessageBox.show(tbluser.Rows.count)

--  作者:9602084
--  发布时间:2016/3/14 22:35:00
--  
显示正常
--  作者:大红袍
--  发布时间:2016/3/14 23:16:00
--  

那弹出

 

MessageBox.show(_cdckxz = "年度考核")