Foxtable(狐表)用户栏目专家坐堂 → 帮我看看哪里错了?


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

主题:帮我看看哪里错了?

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


加好友 发短信
等级:一尾狐 帖子:437 积分:2943 威望:0 精华:0 注册:2011/3/15 12:49:00
帮我看看哪里错了?  发帖心情 Post By:2020/1/5 16:45:00 [只看该作者]

到红字处出错,这是为什么?

Dim filters As String = "合同号 = '" & e.Form.Controls("合同号").Text & "'And 款号 = '" &  e.Form.Controls("款号").Text & "' And 业务担当 = '" & e.Form.Controls("业务担当").Text & "' And 合同交期 = '" & e.Form.Controls("合同交期").Text & "' And 客户名称 = '" & e.Form.Controls("客户名称").Text & "' And 品名 = '" & e.Form.Controls("品名").Text & "'"
Dim cmd As New SQLCommand
Dim dtsj As DataTable
cmd.C
cmd.CommandText = "select * Fro m {订单主表} where " & filters
dtsj = cmd.ExecuteReader(True) '记得将参数设置为True
If dtsj.DataRows.count = 0 Then
    msgbox("没有数据")
    Return
End If
Dim pbxk As WinForm.PictureBox = Forms("订单查询修改").Controls("PictureBox1")
Dim img As String = ProjectPath & "Attachments\暂无图片.jpg"
Dim sfz As String =  dtsj.DataRows(0)("款式图片")
Dim fmz As String =  ProjectPath & "\RemoteFiles\" & sfz
Dim nr As WinForm.TextBox = e.Form.Controls("合同号")
Dim nk As WinForm.TextBox = e.Form.Controls("款号")
Dim ftp1 As New FtpClient
ftp1.Host=Tables("FTPIP").Current("FTPhost")
ftp1.Account = Tables("FTPIP").Current("FTPAccount")
ftp1.Password = Tables("FTPIP").Current("FTPpassword")
If ftp1.FileExists(sfz) Then
    ftp1.DeleteFile(sfz)
sfz = Nothing
    dtsj.Save()
End If
If FileSys.FileExists(fmz) Then
    FileSys.DeleteFile(fmz,2,2)
End If
Dim dlg As new OpenFileDialog
If dlg.ShowDialog = DialogResult.OK Then
    If ftp1.Upload(dlg.FileName, "\kst\"& e.Form.Controls("合同号").Text & e.Form.Controls("款号").Text & ".jpg") = True Then
        dtsj.DataRows(0)("款式图片") &= IIF(dtsj.DataRows(0).IsNull("款式图片"), "",vbcrlf) & "\kst\" & e.Form.Controls("合同号").Text & e.Form.Controls("款号").Text & ".jpg"
        Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Else
        Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    End If
msgbox(1)
    dtsj.Save()
msgbox(2)
    If FileSys.FileExists(fmz) = False AndAlso ftp1.FileExists(sfz) Then
msgbox(2.5)
        ftp1.Download(sfz,fmz)
msgbox(3)
    End If
    If FileSys.FileExists(fmz) Then
        pbxk.ImageFile = fmz
msgbox(4)
    Else
        pbxk.ImageFile  = img
msgbox(5)
    End If
    ftp1.close
msgbox(6)
End If
If dtsj.HasChanges Then
msgbox(7)
    If MessageBox.Show("订单已经被修改,是否保存?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
        dtsj.Save()
    End If
End If

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


加好友 发短信
等级:超级版主 帖子:107729 积分:547978 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/1/5 21:34:00 [只看该作者]

提示什么错误?

 回到顶部