IT
posts - 497,comments - 45,trackbacks - 0

09 2011 档案
导出Execl
摘要: 在事件里调用 this.Export("application/ms-excel", "凭证导出" + DateTime.Now.ToString("yyyyMMddhhmmss")); 即可 private void Export(string FileType, string FileName) { switch (FileType) { case "application/ms-excel": ExportExcel(GetOutHtml(), FileName); break; default: break阅读全文
posted @ 2011-09-27 21:45 liufei 阅读(42) | 评论 (0) 编辑
C#遍历整个文件夹及子目录的文件代码,.Net技术文章,Asp.net系列教程,Asp.n...
摘要: public void ListFiles(FileSystemInfo info){if (!info.Exists) return;DirectoryInfo dir = info as DirectoryInfo;//不是目录if (dir == null) return;FileSystemInfo[] files = dir.GetFileSystemInfos();for (int i = 0; i < files.Length; i++){FileInfo file = files[i] as FileInfo;//是文件if (file != null){//Consol阅读全文
posted @ 2011-09-23 15:58 liufei 阅读(49) | 评论 (0) 编辑
自定义服务器控件开发之2:文件上传控件
摘要: 文件上传的控件,支持上传后事件,跨服务器上传,自定义可上传文件类型、大小,以及上传文件命名规则。1usingSystem.Web.UI.HtmlControls;2usingSystem.Configuration;3usingSystem.ComponentModel;4usingSystem.Web.Security;5usingSystem.Security.Principal;6usingSystem.Drawing;7usingSystem.Drawing.Text;8usingSystem.Collections;9usingSystem.Collections.Specializ阅读全文
posted @ 2011-09-15 13:41 liufei 阅读(23) | 评论 (0) 编辑
0-9所对应的汉字
摘要: protected void Page_Load(object sender, EventArgs e) { Response.Write(LoanCapital(2596736)); Response.End(); } public static string LoanCapital(decimal num) { string str1 = "零壹贰叁肆伍陆柒捌玖"; //0-9所对应的汉字 string str2 = "万仟佰拾亿仟佰拾万仟佰拾元角分"; //数字位所对应的汉字 string str3 = ""; //从原num值阅读全文
posted @ 2011-09-05 17:50 liufei 阅读(13) | 评论 (0) 编辑
字符串与整型的转换及判断
摘要: clbd_control 将字符串转换为 int这些示例演示了一些用于将 string 转换为 int 的不同方法。例如,当从命令行参数获取数值输入时,此类转换会很有用。还存在一些将字符串转换为其他数值类型(如 float 或 long)的类似方法。下表列出了其中的一些方法。数值类型方法decimalToDecimal(String)floatToSingle(String)doubleToDouble(String)shortToInt16(String)longToInt64(String)ushortToUInt16(String)uintToUInt32(String)ulongToU阅读全文
posted @ 2011-09-05 09:57 liufei 阅读(24) | 评论 (0) 编辑
ms sql 分割字符串
摘要: 方法一 OriginalStr 字符串中间用,分割 SplitChar 要分割的符合调用方法如下 示例 splitvalue 是'fnc_split' 中临时表中的字段@configvaluestr 整个字符串 billnamestr 要查找的字符串if((Select splitvalue From dbo.fnc_split(@configvaluestr,',') where splitvalue=@billnamestr) is not null)begin insert into @BusinessCashRequirementTB select 1-阅读全文
posted @ 2011-09-02 17:18 liufei 阅读(12) | 评论 (0) 编辑