2012年4月13日
摘要: public class ExcelHelper { //导出csv格式 public static void ExportToCSV(Page page, DataTable dt, string FileName) { System.Web.HttpResponse resp; resp = page.Response; resp.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312"); r... 阅读全文
posted @ 2012-04-13 09:22 gotolovo 阅读(403) 评论(0) 推荐(0) 编辑
摘要: public static class Excel { /// <summary> /// 将dataset里的数据导出为Excel. /// </summary> /// <param name="fileName">导出时保存的文件名.</param> /// <param name="page">页对象.</param> /// <param name="dataset">数据集.</param> public static void 阅读全文
posted @ 2012-04-13 09:21 gotolovo 阅读(329) 评论(0) 推荐(0) 编辑
  2011年9月24日
摘要: private static void Replace(string html){if (html.IndexOf(',') > 0){ html = html.Substring(0, html.IndexOf(','));}html = Regex.Replace(html, @"\s|[a-z]|[\u4e00-\u9fa5]", string.Empty, RegexOptions.IgnoreCase);//html = Regex.Replace(html, @"[a-z]", string.Empty, 阅读全文
posted @ 2011-09-24 00:31 gotolovo 阅读(193) 评论(0) 推荐(0) 编辑
  2011年1月25日
摘要: 日志管理类class LogManager{ string logFilePath=string.Empty; string logFilePrefix=string.Empth; public string LogFilePath { get{ if(string.IsNullOrEmpth(logFilePath)){if(System.Web.HttpContext==null){logFilePath =System.AppDomain.CurrentDomain.BaseDirectory;}else{logFilePath =System.AppDomain.CurrentDoma 阅读全文
posted @ 2011-01-25 10:40 gotolovo 阅读(366) 评论(0) 推荐(0) 编辑
  2010年12月4日
摘要: using System;using System.Text;using System.Security.Cryptography;using System.IO; public class Des { private static string key = "zhoufoxcn"; public string DesEncrypt(string encryptString) { byte[] k... 阅读全文
posted @ 2010-12-04 19:15 gotolovo 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 在项目中做发送邮件功能时,由于使用的是代理,所以System.Net.Mail.SmtpClient 提示身份验证失败改成System.Web.Mail.SmtpClient 就可以了。该类只有一个Host属性。。貌似只要端口25才可以 阅读全文
posted @ 2010-12-04 18:51 gotolovo 阅读(213) 评论(0) 推荐(0) 编辑
  2010年11月2日
摘要: 使用事务时务必有持久化前提账户活动[代码]交易工作流[代码]配置文件[代码] 阅读全文
posted @ 2010-11-02 15:42 gotolovo 阅读(250) 评论(0) 推荐(0) 编辑
摘要: [代码][代码]初始图运行图我们也可以实现多个工作流实例[代码] 阅读全文
posted @ 2010-11-02 13:34 gotolovo 阅读(221) 评论(0) 推荐(0) 编辑
  2010年10月29日
摘要: 以前做过的一个项目,最近领导发话说不易于搜索引擎的收录。将里面的ViewState去掉可问题是当时项目周期短的可怜不说而且是要人没人要钱没钱的。没有考虑seo的情况完成的。不涉及页面交换的还可以弄掉比较不难将页面EnableViewState设置为false就可以了。问题是很多的页面都涉及交换的 像什么分页 之类的。Ajax大部分都使用了Asp.net Ajax框架 就UpdatePanel那个禁... 阅读全文
posted @ 2010-10-29 16:52 gotolovo 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 工作流系统中有很大一部分需要和人进行交互,有的时候需要很长的时间,所以我们不可能让工作流实例一直保存在内存当中,这就需要进行持久化操作。工作流的持久化就是保存工作流的某些状态信息到持久化存储里,比如sql数据库,文件中,一旦被保存到持久化存储里了,工作流就可以从内存中移除掉,在需要的时候在进行装载。持久化服务是WF中核心服务之一,WF框架提供一个标准的持久化服务SqlWorkflowPersist... 阅读全文
posted @ 2010-10-29 11:11 gotolovo 阅读(499) 评论(0) 推荐(0) 编辑