Foxtable(狐表)用户栏目专家坐堂 → 如何替换字段里的内容


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

主题:如何替换字段里的内容

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


加好友 发短信
等级:五尾狐 帖子:1062 积分:9781 威望:0 精华:0 注册:2012/3/13 5:23:00
如何替换字段里的内容  发帖心情 Post By:2014/8/28 13:17:00 [显示全部帖子]

假如我添加的内容中包含,IMG或者Img_ then

把他们替换为0 应该怎么做呢?

 

If e.DataCol.name="ppp" AndAlso Tables("商品").Current IsNot Nothing Then
Dim s As String = Tables("商品").Current("ppp")
Dim d As Date = e.DataRow("addtime")
Dim bh As String = Format(D,"MMddhhmm")
Dim bh1 As String = Format(D,"yyMMdd") 
   If s > "" Then
        s=filesys.GetName(s)  '得到的是 asss.jpg

  if s 包含 img or 或者 img_ then

      将他们替换为0 
      ' e.DataRow("tao") = s.SubString(0,s.LastIndexOf(".")) & ":1:0:|;"
        e.DataRow("tao1") = s.SubString(0,s.LastIndexOf("."))
        e.DataRow("cn_name")= bh & e.DataRow("tao1")          
        e.DataRow("taobao")=e.DataRow("tao1") & ":1:0:|;"
        e.DataRow("bh1")= bh1

End If


 回到顶部