Foxtable(狐表)用户栏目专家坐堂 → 请教


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

主题:请教

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


加好友 发短信 一级勋章 三级勋章 二级勋章
等级:超级版主 帖子:6318 积分:33945 威望:0 精华:10 注册:2008/8/31 20:56:00
  发帖心情 Post By:2009/1/30 16:23:00 [显示全部帖子]

“工业地价”、“商业地价”与“住宅地价”三列数据来源于“基准地价”表中的哪一列?

⑤“基准地价”中“用地性质”等于“估价报告”中对应的列。请问这三列是用数据列还是表达式列合适并如何设置代码?

估价报告表中没有用地性质,怎么对应?

 回到顶部
帅哥哟,离线,有人找我吗?
czy
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 一级勋章 三级勋章 二级勋章
等级:超级版主 帖子:6318 积分:33945 威望:0 精华:10 注册:2008/8/31 20:56:00
  发帖心情 Post By:2009/1/30 19:00:00 [显示全部帖子]

PrepareEdit事件代码

If e.IsFocusCell Then
    If e.Col.Name = "土地位置" Then
        If e.Row.IsNull("土地所在乡镇") Then
            e.Col.Combolist = ""
        Else
            e.Col.Combolist = DataTables("基准地价").GetComboListString("街道名称", "[乡镇名称] = '" & e.Row("土地所在乡镇") & "'")
        End If
    End If
End If

If e.IsFocusCell Then
    If e.Col.Name = "工业地价" Then
        If e.Row.IsNull("土地级别") Then
            e.Col.Combolist = ""
        Else
            e.Col.Combolist = DataTables("基准地价").GetComboListString("基准地价", "[乡镇名称] = '" & e.Row("土地所在乡镇") & "'and [街道名称] = '" & e.Row("土地位置") & "'and [土地级别] = '" & e.Row("土地级别") & "'and [开始执行日期] <= #" & e.Row("估价期日") & "# and [结束日期] >= #" & e.Row("估价期日") & "# and [用地性质] = '工业'")
        End If
    End If
End If

If e.IsFocusCell Then
    If e.Col.Name = "商业地价" Then
        If e.Row.IsNull("土地级别") Then
            e.Col.Combolist = ""
        Else
            e.Col.Combolist = DataTables("基准地价").GetComboListString("基准地价", "[乡镇名称] = '" & e.Row("土地所在乡镇") & "'and [街道名称] = '" & e.Row("土地位置") & "'and [土地级别] = '" & e.Row("土地级别") & "'and [开始执行日期] <= #" & e.Row("估价期日") & "# and [结束日期] >= #" & e.Row("估价期日") & "# and [用地性质] = '商业'")
        End If
    End If
End If

If e.IsFocusCell Then
    If e.Col.Name = "住宅地价" Then
        If e.Row.IsNull("土地级别") Then
            e.Col.Combolist = ""
        Else
            e.Col.Combolist = DataTables("基准地价").GetComboListString("基准地价", "[乡镇名称] = '" & e.Row("土地所在乡镇") & "'and [街道名称] = '" & e.Row("土地位置") & "'and [土地级别] = '" & e.Row("土地级别") & "'and [开始执行日期] <= #" & e.Row("估价期日") & "# and [结束日期] >= #" & e.Row("估价期日") & "# and [用地性质] = '住宅'")
        End If
    End If
End If


 回到顶部
帅哥哟,离线,有人找我吗?
czy
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 一级勋章 三级勋章 二级勋章
等级:超级版主 帖子:6318 积分:33945 威望:0 精华:10 注册:2008/8/31 20:56:00
  发帖心情 Post By:2009/1/30 19:45:00 [显示全部帖子]

楼上的代码表达式段太长,还是改成这样比较好。


Dim str As String = "[乡镇名称] = '" & e.Row("土地所在乡镇") & "'"
If e.IsFocusCell Then
    If e.Col.Name = "土地位置" Then
        If e.Row.IsNull("土地所在乡镇") Then
            e.Col.Combolist = ""
        Else
            e.Col.Combolist = DataTables("基准地价").GetComboListString("街道名称",str)
        End If
    End If
End If
str = str & " and [街道名称] = '" & e.Row("土地位置") & "'and [土地级别] = '" & e.Row("土地级别") & "'and [开始执行日期] <= #" & e.Row("估价期日") & "# and [结束日期] >= #" & e.Row("估价期日") & "# "
If e.IsFocusCell Then
    If e.Col.Name = "工业地价" Then
        If e.Row.IsNull("土地级别") Then
            e.Col.Combolist = ""
        Else
            e.Col.Combolist = DataTables("基准地价").GetComboListString("基准地价", str & " and [用地性质] = '工业'")
        End If
    End If
End If

If e.IsFocusCell Then
    If e.Col.Name = "商业地价" Then
        If e.Row.IsNull("土地级别") Then
            e.Col.Combolist = ""
        Else
            e.Col.Combolist = DataTables("基准地价").GetComboListString("基准地价", str & " and [用地性质] = '商业'")
        End If
    End If
End If

If e.IsFocusCell Then
    If e.Col.Name = "住宅地价" Then
        If e.Row.IsNull("土地级别") Then
            e.Col.Combolist = ""
        Else
            e.Col.Combolist = DataTables("基准地价").GetComboListString("基准地价", str & " and [用地性质] = '住宅'")
        End If
    End If
End If


 回到顶部