摘要: 上篇写的那个那个导出Excel的方法导出Excel的时间慢,后面想了个别的方法,导出Excel的时间很快 1 public string CreateAdvExcel(IList<DocAdvInfo> lt) 2 { 3 StringBuilder builder = new StringBuilder(); 4 Random rn = new Random(); 5 string name = rn.Next(9999) + ".xls"; 6 string path = Ser... 阅读全文
posted @ 2012-04-24 15:18 fycaijing 阅读(2928) 评论(0) 推荐(0)
摘要: 1 /// <summary> 2 /// 下载文档 3 /// </summary> 4 /// <returns></returns> 5 public ActionResult download() 6 { 7 WebClient client = new WebClient(); 8 int id = Request.QueryString["id"].ToInteger(); 9 DocumentRegisterInfo info... 阅读全文
posted @ 2012-04-13 12:52 fycaijing 阅读(347) 评论(0) 推荐(0)
摘要: 没有权限 设置权限WebClient client=new WebClient();//NetworkCredential credentials = new NetworkCredential("名字", "密码");//client.Credentials = credentials;未能为 SSL/TLS 安全通道建立信任的解决办法 最简单的办法是:1,先加入命名空间:using System.Net.Security;using System.Security.Authentication;using System.Security.Crypto 阅读全文
posted @ 2012-04-13 12:48 fycaijing 阅读(16350) 评论(0) 推荐(1)
摘要: 1 /// <summary> 2 /// 文档转换成swf 3 /// </summary> 4 /// <param name="path">被转换文件的路径</param> 5 /// <param name="oldfile">被转换文件名</param> 6 /// <returns></returns> 7 public void GetCMDOutString(string path, string oldfile,string swfname) 阅读全文
posted @ 2012-04-13 12:41 fycaijing 阅读(376) 评论(0) 推荐(0)
摘要: 1 JavaScript代码实现空位补零 2 实现一: 3 代码如下: 4 /* 平淡无奇法 */ 5 function pad(num, n) { 6 var i = (num + "").length; 7 while(i++ < n) num = "0" + num; 8 return num; 9 }10 11 上面的代码太平淡无奇,体现不了我的真实水平。于是有了实现二:12 代码如下:13 /* 神奇递归法 */14 function pad2(num, n) {15 if ((num + "").length > 阅读全文
posted @ 2012-04-13 11:53 fycaijing 阅读(6120) 评论(2) 推荐(1)
摘要: 1 <html xmlns="http://www.w3.org/1999/xhtml" > 2 <head runat="server"> 3 <title>DocRead</title> 4 </head> 5 <body> 6 <div> 7 <object type="application/pdf" data="服务器路径" style="margin:0px 120px;" width=&quo 阅读全文
posted @ 2012-04-13 11:49 fycaijing 阅读(1947) 评论(3) 推荐(0)
摘要: //创建xml public ActionResult XML() { SearchArticle search = new SearchArticle { SearchType = SearchTypeEnum.Top, Top = 4, Status = StatusEnum.Active, }; IList<ArticleInfo> list = article.SearchA... 阅读全文
posted @ 2012-04-11 15:40 fycaijing 阅读(411) 评论(0) 推荐(0)
摘要: /// <summary> /// 创建Excel /// </summary> /// <returns></returns> public object CreateExcel(IList<DocumentRegisterInfo> list) { Application myExcel = new Application(); myExcel.Application.Workbooks.Add(true); myExcel.Visible = true; Type type = list[0].GetType(); Proper 阅读全文
posted @ 2012-03-16 12:58 fycaijing 阅读(506) 评论(0) 推荐(0)
摘要: 刚出来实习什么都不懂,什么也不会,感觉学校里学的那些根本没有什么用,现在在公司里一天上八个小时班,一直对着电脑,敲着噼里啪啦的键盘,看着自己写的代码,突然间觉得毫无意思。每个月1500的工资,每天上下班还要挤着那拥挤的地铁,付着每月600的房租,这剩下的还有吗?真的不敢想象以后会是什么样的,这就是程序员的生活吗? 阅读全文
posted @ 2012-03-02 11:11 fycaijing 阅读(210) 评论(1) 推荐(0)