摘要: public static string GetFileMd5Hash(string strFileFullPath) { // Create a new instance of the MD5CryptoServiceProvider obje... 阅读全文
posted @ 2014-04-28 15:35 comeonfyz 阅读(2212) 评论(0) 推荐(0)
摘要: 1、绑定数据和配置:var wptConfig=;webPivotTable.setCsvData(, ,eval(wptConfig));三个参数依次对应列,数据源,配置文件,列是指定的一个数组,格式:["a","b"],数据的格式:[["a","b"],["c","d"]],配置文件是一个JSO... 阅读全文
posted @ 2014-04-23 10:56 comeonfyz 阅读(1120) 评论(0) 推荐(0)
摘要: public ActionResult ListService() { //获取已经保存好的windows服务名称 IList List =GetServiceNameList; ServiceController serviceObject = null; foreach (Model.ReportServicesInfoEnt e in List) { FileInfo fi= GetWindowsServiceInstallPath(e.Servi... 阅读全文
posted @ 2014-01-17 17:16 comeonfyz 阅读(1037) 评论(0) 推荐(0)
摘要: 1 using System; 2 using System.Security.Cryptography; 3 using System.Text; 4 using System.IO; 5 6 namespace AES 7 { 8 public class AESEncryption 9 { 10 private static string strKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; 11 /// 12 /// AES加密算法 13 ///... 阅读全文
posted @ 2013-11-21 15:22 comeonfyz 阅读(581) 评论(0) 推荐(0)
摘要: 1 /// 2 /// 记录日志 3 /// 4 /// 5 protected void EndThing(string msg) 6 { 7 string DirPath = ApplicationPath + @"\Log\" + DateTime.Now.ToString("yyyyMMdd") + @"\"; 8 if (!Directory.Exists(DirPath))//如果不存在就创建file文件夹 9 {1... 阅读全文
posted @ 2013-11-21 15:17 comeonfyz 阅读(335) 评论(0) 推荐(0)
摘要: 1 private static int ExecuteMSSql(DbInfo db, string sqlPath) 2 { 3 Console.WriteLine("================================================================="); 4 Console.WriteLine("==========当前执行的mssql脚本:"+sqlPath); 5 Console.WriteLine("=====================... 阅读全文
posted @ 2013-11-21 15:12 comeonfyz 阅读(738) 评论(0) 推荐(0)
摘要: 1,首先需要将MySql.Data.dll复制到codesmith安装目录下v6.5/bin文件夹下,注意dll的版本2,其次采用的是.net4.0的配置文件,找到C:\Windows\Microsoft.Net\Framework\v4.0.30319\Config\machine在其中的DbPr... 阅读全文
posted @ 2013-10-15 20:41 comeonfyz 阅读(521) 评论(0) 推荐(0)
摘要: 在做大型网站或者系统的时候,经常会遇到个问题就是批量插入或者修改数据库。如果遇到这个问题,还是一条条记录来处理,这样的效率太低了,所以要考虑批量插入或者修改今天这边不讲SqlBulkCopy,只简单讲sql自定义表类型。因为目前的项目我用到了分表的方式,用存储过程比较方便自动创建分表。现在把我目前写的功能简单做个记录,也方便以后自己查阅第一步,在数据库里点击 新建查询 创建相应的sql--======自定义表类型Demo======--创建表create table tab( tabvalue varchar(10))go--创建自定义表类型create type Type_tab as ta 阅读全文
posted @ 2013-01-24 10:41 comeonfyz 阅读(6525) 评论(0) 推荐(0)
摘要: 最近的项目用的是form验证,所以必须在配置站点的时候必须要有统一的域名,域名好说,在hosts里改下就可以配置成相同域名。因为要用域名调试,所以就没直接F5调试,而是附加到进程w3wp.exe 调试,以前一直都这样调试,很正常。今天却发现找到不进程了。 最近刚重装系统,windows7+vs2008 居然找不到进程,这怎么调试,百度了很久也没发现有人有相同的遭遇,没办法,自己解决吧。其实解决很简单,勾上底下的“显示所有会话的进程”,这样就可以找到了。over 阅读全文
posted @ 2011-06-02 11:27 comeonfyz 阅读(912) 评论(0) 推荐(0)
摘要: 在第三篇里已经实现了文件的传输,但是在第三篇里,传输的文件是用一个包传过去的,如果文件大点的话,就无法实现了,今天我们来讲如何将大文件分包来处理。既然一个大文件不能一次传,那就要多次传了,既然是多次,那就要分包了。先把demo贴出,程序中都有注释。服务端:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net.Sockets;using System.Net;using System.IO;namespace FileReceiveControl{ p. 阅读全文
posted @ 2011-05-10 15:37 comeonfyz 阅读(1059) 评论(7) 推荐(0)