随笔分类 - 工具类
摘要:http://www.cnblogs.com/wolf-sun/p/3347373.html
阅读全文
摘要:1. 调用代码 1 string cdfURL = "http://****/test.asmx"; 2 string webserviceName = cdfURL.ToString().Substring(cdfURL.ToString().LastIndexOf("/") + 1, (cdfURL.ToString().LastIndexOf(".") - cdfURL.ToString().LastIndexOf("/")) - 1); 3 System.Reflection.Assembly asm =
阅读全文
摘要:1. FTPHelper 1 using System; 2 using System.Collections.Generic; 3 using System.IO; 4 using System.Net; 5 using System.Text; 6 7 public class FTPHelper 8 { 9 /// 10 /// 上传文件 11 /// 12 /// 需要上传的文件 13 /// 目标路径 14 /// ftp地址 15 /// ...
阅读全文
摘要:1. OLEDB这种方式将Excel作为一个数据源,直接用Sql语句获取数据了。优点:1) 读取速度快2) Excel版本兼容性好3) 运行的机器不需要安装相应的Excel缺点:1)对Excel单元格样式操作欠缺2) 列类型的判断逻辑不合理,当指定了首行作为头(header)的时候,Oledb会根据该列的前若干行数据类型类判断该列的数据类型,这会导致数据丢失。例如某列前n行都为int,列的数据类型被判断为int,那么n+1行后的非可转为int的数据都会被清空。3) Microsoft.Jet.OLEDB.4.0 不支持64位的操作系统,在64位的操作系统需要特殊处理。4) Microsoft.
阅读全文
摘要:#region 加压解压方法 /// /// 功能:压缩文件(暂时只压缩文件夹下一级目录中的文件,文件夹及其子级被忽略) /// /// 被压缩的文件夹夹路径 /// 生成压缩文件的路径,为空则默认与被压缩文件夹同一级目录,名称为:文件夹名+.zip /// 出错信息 /// 是否压缩成功 public bool ZipFile(string dirPath, string zipFilePath, out string err) { stri...
阅读全文
浙公网安备 33010602011771号