| 发表于:2007-02-08 13:29:483楼 得分:18 |
1. if (convert.isdbnull(o)) { hasphoto = false; } else { ks_photo = (byte[])dt.tables[0].rows[0][ "ks_photo "]; if (ks_photo.length == 0) hasphoto = false; else hasphoto = true; } 2. public static image photo { get { if (hasphoto == false) return null; system.io.memorystream ms = new system.io.memorystream(ks_photo); image im = image.fromstream(ms); ms.close(); return im; } } 3.photo.width,photo.height | | |
|