Foxtable(狐表)用户栏目专家坐堂 → 选择RadioButton输入不同的表


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

主题:选择RadioButton输入不同的表

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


加好友 发短信
等级:九尾狐 帖子:2701 积分:17999 威望:0 精华:0 注册:2013/4/9 10:41:00
  发帖心情 Post By:2016/8/26 11:23:00 [只看该作者]

没有道理啊 

If e.Form.Controls("RadioButton1").checked Then
    Dim ndrb As DataRow = DataTables("表A").AddNew
    ndrb("金额") = e.Form.controls("TextBox1").text
    ndrb("去向") = e.Form.controls("RadioButton5").Text
    If e.Form.Controls("RadioButton6").Checked Then
    ElseIf e.Form.Controls("RadioButton7").Checked Then
    ElseIf e.Form.Controls("RadioButton8").Checked Then
    End If
End If

If e.Form.Controls("RadioButton2").checked Then
    Dim ndrb As DataRow = DataTables("表B").AddNew
    ndrb("金额") = e.Form.controls("TextBox1").text
    ndrb("去处") = e.Form.controls("RadioButton5").Text
    If e.Form.Controls("RadioButton6").Checked Then
    ElseIf e.Form.Controls("RadioButton7").Checked Then
    ElseIf e.Form.Controls("RadioButton8").Checked Then
    End If
End If
If e.Form.Controls("RadioButton3").checked Then
    Dim ndrb As DataRow = DataTables("表C").AddNew
    ndrb("金额") = e.Form.controls("TextBox1").text
    ndrb("去向") = e.Form.controls("RadioButton1").Text
    If e.Form.Controls("RadioButton2").Checked Then
    ElseIf e.Form.Controls("RadioButton3").Checked Then
    ElseIf e.Form.Controls("RadioButton4").Checked Then
    End If
End If
If e.Form.Controls("RadioButton4").checked Then
    Dim ndrb As DataRow = DataTables("表D").AddNew
    ndrb("金额") = e.Form.controls("TextBox1").text
    ndrb("去向") = e.Form.controls("RadioButton5").Text
    If e.Form.Controls("RadioButton6").Checked Then
    ElseIf e.Form.Controls("RadioButton7").Checked Then
    ElseIf e.Form.Controls("RadioButton8").Checked Then
    End If
End If

If e.Form.Controls("RadioButton5").checked Then
    Dim ndrb As DataRow = DataTables("表A").AddNew
    ndrb("金额") = e.Form.controls("TextBox1").text
    ndrb("来源") = e.Form.controls("RadioButton1").Text
    If e.Form.Controls("RadioButton2").Checked Then
    ElseIf e.Form.Controls("RadioButton3").Checked Then
    ElseIf e.Form.Controls("RadioButton4").Checked Then
    End If
End If
If e.Form.Controls("RadioButton6").checked Then
    Dim ndrb As DataRow = DataTables("表B").AddNew
    ndrb("金额") = e.Form.controls("TextBox1").text
    ndrb("提取处") = e.Form.controls("RadioButton1").Text
    If e.Form.Controls("RadioButton2").Checked Then
    ElseIf e.Form.Controls("RadioButton3").Checked Then
    ElseIf e.Form.Controls("RadioButton4").Checked Then
    End If
End If
If e.Form.Controls("RadioButton7").checked Then
    Dim ndrb As DataRow = DataTables("表C").AddNew
    ndrb("金额") = e.Form.controls("TextBox1").text
    ndrb("来源") = e.Form.controls("RadioButton1").Text
    If e.Form.Controls("RadioButton2").Checked Then
    ElseIf e.Form.Controls("RadioButton3").Checked Then
    ElseIf e.Form.Controls("RadioButton4").Checked Then
    End If
End If
If e.Form.Controls("RadioButton8").checked Then
    Dim ndrb As DataRow = DataTables("表D").AddNew
    ndrb("金额") = e.Form.controls("TextBox1").text
    ndrb("来源") = e.Form.controls("RadioButton1").Text
    If e.Form.Controls("RadioButton2").Checked Then
    ElseIf e.Form.Controls("RadioButton3").Checked Then
    ElseIf e.Form.Controls("RadioButton4").Checked Then
    End If
End If

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


加好友 发短信
等级:狐神 帖子:5015 积分:25363 威望:0 精华:0 注册:2015/8/18 9:21:00
  发帖心情 Post By:2016/8/26 12:00:00 [只看该作者]

所以说呀,基础没学好,又不想花时间学。别人20分钟能做好的事情,您花了几天时间。

If e.Form.Controls("RadioButton1").checked Then
    Dim ndrb As DataRow = DataTables("表A").AddNew
    ndrb("金额") = e.Form.controls("TextBox1").text
    If e.Form.Controls("RadioButton5").Checked Then
        ndrb("去向") = e.Form.controls("RadioButton5").Text
    ElseIf e.Form.Controls("RadioButton6").Checked Then
        ndrb("去向") = e.Form.controls("RadioButton6").Text
    ElseIf e.Form.Controls("RadioButton7").Checked Then
        ndrb("去向") = e.Form.controls("RadioButton7").Text
    Else
        ndrb("去向") = e.Form.controls("RadioButton8").Text
    End If
End If

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


加好友 发短信
等级:九尾狐 帖子:2701 积分:17999 威望:0 精华:0 注册:2013/4/9 10:41:00
  发帖心情 Post By:2016/8/26 12:35:00 [只看该作者]

还是不行 再帮忙看看 谢谢 
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:去项来向.table


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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/8/26 14:33:00 [只看该作者]

 没看懂你想表达什么,列出要做的效果。


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


加好友 发短信
等级:九尾狐 帖子:2701 积分:17999 威望:0 精华:0 注册:2013/4/9 10:41:00
  发帖心情 Post By:2016/8/26 15:52:00 [只看该作者]

就是在GroupBox1选择不同的RadioButton后把GroupBox2上面选中的RadioButton名称复制到表A,B,C,D,的去向列里面。感谢感谢,和你上次帮我的一样,左边名称复制到右边代表的表的来向,右边名称复制到左边代表的表的去向列,麻烦你们了。
[此贴子已经被作者于2016/8/26 16:12:43编辑过]

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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/8/26 16:09:00 [只看该作者]

参考代码

 

    Dim ndrb As DataRow = DataTables("表A").AddNew

    ndrb("金额") = e.Form.controls("TextBox1").text
    If e.Form.Controls("RadioButton5").Checked Then
        ndrb("去向") = e.Form.controls("RadioButton5").Text
    ElseIf e.Form.Controls("RadioButton6").Checked Then
        ndrb("去向") = e.Form.controls("RadioButton6").Text
    ElseIf e.Form.Controls("RadioButton7").Checked Then
        ndrb("去向") = e.Form.controls("RadioButton7").Text
    Else
        ndrb("去向") = e.Form.controls("RadioButton8").Text
    End If

 回到顶部
总数 96 上一页 1 2 3 4 5 6 7 8 9 10