Foxtable(狐表)用户栏目专家坐堂 → [求助]图片管理


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

主题:[求助]图片管理

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/11/29 21:55:00 [显示全部帖子]

Select Case e.DataCol.Name

    Case  “名称一”,“名称二”,“名称3”

        if e.NewValue Is nothing Then

             e.DataRow(e.Datacol.Name &"图片") = nothing

        else

           e.DataRow(e.Datacol.Name &"图片") = e.NewValue & ".jpg"

        end if

end select

 


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/11/30 10:37:00 [显示全部帖子]

BeforeAttachFile 事件代码

 

Dim dr As DataRow = e.DataRow
Select Case e.DataCol.Name
    Case "图片1"
        If dr.IsNull("图片1名称")  Then
            MessageBox.Show("请先图片1!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
            e.Cancel = True
        Else
            e.FileName = dr("图片1名称") & ".jpg"
        End If
    Case "图片2"
        If dr.IsNull("图片2名称")  Then
            MessageBox.Show("请先图片2!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
            e.Cancel = True
        Else
            e.FileName = dr("图片2名称") & ".jpg"
        End If
    Case "图片3"
        If dr.IsNull("图片3名称")  Then
            MessageBox.Show("请先图片3!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
            e.Cancel = True
        Else
            e.FileName = dr("图片3名称") & ".jpg"
        End If
End Select


 回到顶部