Dim lvw As WinForm.ListView = e.Form.Controls("ListView1") Dim spbm As String=e.Form.Controls("spbm") Dim dt As DataTable lvw.Rows.Clear() '清除原来的行 lvw.Images.Clear() '清除原来的图片 lvw.View = ViewMode.SmallIcon '用小图标模式 Dim cmd As new sqlcommand cmd.ConnectionName="foxtable" cmd.CommandText="select * from {签字管理} where 签字编号='" & spbm & "'" dt=cmd.ExecuteReader For Each dr As DataRow In dt.DataRows lvw.Images.AddSmallImage(dr("签字地址"),dr("签字地址") & ".ico") '添加代表这个国家的小图标 Dim r As WinForm.ListViewRow = lvw.Rows.Add() '增加一行 r.Text = dr("审批时间") '指定标题 r.ImageKey = dr("签字地址") '指定图标键值 Next
|