Foxtable(狐表)用户栏目专家坐堂 → messagebox问题


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

主题:messagebox问题

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


加好友 发短信
等级:八尾狐 帖子:1936 积分:14844 威望:0 精华:0 注册:2016/4/28 9:58:00
messagebox问题  发帖心情 Post By:2016/12/8 17:11:00 [只看该作者]

Result = Messagebox.Show("是否确认导入到" & e.fORm.Controls("combobox1").value & "考试成绩表中","警告", MessageBoxButtons.YesNo, MessageBoxIcon.Question)

提示时选定的按钮是“是",能否选定的按钮是"否"

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


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2016/12/8 17:35:00 [只看该作者]

MessageBox.Show("XXX", "yyy", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)

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


加好友 发短信
等级:婴狐 帖子:18 积分:191 威望:0 精华:0 注册:2016/12/7 18:20:00
  发帖心情 Post By:2016/12/8 17:39:00 [只看该作者]

我想做这样一个表:一个日期列,一个天数列,我要怎么做才能在日期列输入日期,在天数列输入天数,然后在另一列显示日期加天数后的新日期,求大神帮我

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


加好友 发短信
等级:八尾狐 帖子:1936 积分:14844 威望:0 精华:0 注册:2016/4/28 9:58:00
  发帖心情 Post By:2016/12/8 21:24:00 [只看该作者]

Dim Result As DialogResult
Result = Messagebox.Show("是否确认导入到" & e.fORm.Controls("combobox1").value & "考试成绩表中","警告", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)
If Result = DialogResult.YES Then 
Dim dlg As new OpenFileDialog
dlg.Filter = "Excel|*.xls;*.xlsx"
Dim ksmc As String = trim(e.Form.controls("combobox1").value)
Dim cmd As new SQLCommand
cmd.C
cmd.CommandText = "Sele  ct * from{成绩} where 考试名称 = '" & ksmc & "'"
Dim dt As DataTable = cmd.ExecuteReader(True)
If dlg.ShowDialog = DialogResult.OK Then
    Dim Book As New XLS.Book(dlg.FileName)
    Dim Sheet As XLS.Sheet = Book.Sheets(0)
    Dim str As String = trim(e.Form.controls("combobox1").value) 
    If sheet(0,0).value.Contains(str) Then
    For n As Integer = 2 To Sheet.Rows.Count -1
        Dim dr As DataRow = dt.find("考试名称 = '" & ksmc & "' and 考号 = '" & trim(sheet(n,0).value) & "'")
        If dr IsNot Nothing Then
            For m As Integer = 1 To sheet.Cols.count -1
                dr(trim(sheet(1,m).value) & "_B") = val(sheet(n,m).value)
            Next
        End If
    Next
    dt.save
End If
DataTables("成绩").load
Else
Messagebox.Show("你所选择的EXCL表第一行不包含考试名称,有可能你选错了表或选错了考试名称","警告")
End If
End If

老师我设计时为了防止用户选表时出现选错样表,但测试mess不出现呢?


 回到顶部
帅哥,在线噢!
有点蓝
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106152 积分:539877 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2016/12/8 21:40:00 [只看该作者]

Dim Result As DialogResult
Result = Messagebox.Show("是否确认导入到" & e.fORm.Controls("combobox1").value & "考试成绩表中","警告", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)
If Result = DialogResult.YES Then
    Dim dlg As new OpenFileDialog
    dlg.Filter = "Excel|*.xls;*.xlsx"
    Dim ksmc As String = trim(e.Form.controls("combobox1").value)
    Dim cmd As new SQLCommand
    cmd.C
    cmd.CommandText = "Sele  ct * from{成绩} where 考试名称 = '" & ksmc & "'"
    Dim dt As DataTable = cmd.ExecuteReader(True)
    If dlg.ShowDialog = DialogResult.OK Then
        Dim Book As New XLS.Book(dlg.FileName)
        Dim Sheet As XLS.Sheet = Book.Sheets(0)
        Dim str As String = trim(e.Form.controls("combobox1").value)
        If sheet(0,0).value.Contains(str) Then
            For n As Integer = 2 To Sheet.Rows.Count -1
                Dim dr As DataRow = dt.find("考试名称 = '" & ksmc & "' and 考号 = '" & trim(sheet(n,0).value) & "'")
                If dr IsNot Nothing Then
                    For m As Integer = 1 To sheet.Cols.count -1
                        dr(trim(sheet(1,m).value) & "_B") = val(sheet(n,m).value)
                    Next
                End If
            Next
            dt.save
        Else
            Messagebox.Show("你所选择的EXCL表第一行不包含考试名称,有可能你选错了表或选错了考试名称","警告")
        End If
        DataTables("成绩").load
    End If
End If

 回到顶部