摘要: using System.Data;using System.Data.SqlClient;SqlConnection con = new SqlConnection();con.ConnectionString = "server=.;database=stu;uid=sa;pwd=sa";con... 阅读全文
posted @ 2015-09-07 11:09 飞行在午夜 阅读(178) 评论(0) 推荐(0) 编辑
摘要: DataTable dt = new DataTable(); System.Data.SqlClient.SqlConnection cnn = new Sy... 阅读全文
posted @ 2015-09-07 10:37 飞行在午夜 阅读(170) 评论(0) 推荐(0) 编辑
摘要: using System.Diagnostics;Stopwatch watch = new Stopwatch();watch.Start();//--------功能代码watch.Stop();LogUtil.WriteLog(new Exception("处理时间:" +watch.Elap... 阅读全文
posted @ 2015-07-31 11:03 飞行在午夜 阅读(165) 评论(0) 推荐(0) 编辑
摘要: using System.Web.Security;string XMLDataDigest(string xml){ //xml: 需要发送的xml正文内容,如…… //密钥: 000000 string EnPswdStr = FormsAuthentic... 阅读全文
posted @ 2015-04-29 11:01 飞行在午夜 阅读(1639) 评论(0) 推荐(0) 编辑
摘要: JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); //执行序列化 string r1 = jsonSerializer.Serialize(personnel); ... 阅读全文
posted @ 2015-04-29 10:57 飞行在午夜 阅读(177) 评论(0) 推荐(0) 编辑
摘要: DataTable To JsonDataTable dt = null; dt = new DataTable();//实例化 JavaScriptSerializer javaScriptSerializer = new JavaScriptSeria... 阅读全文
posted @ 2015-04-28 18:48 飞行在午夜 阅读(318) 评论(0) 推荐(0) 编辑
摘要: String url = "http://XXXXXXXX"; WebClient webClient = new WebClient(); webClient.Headers.Add("Content-Ty... 阅读全文
posted @ 2015-04-27 20:49 飞行在午夜 阅读(1043) 评论(0) 推荐(0) 编辑
摘要: 如下内容,转载于网上的某个大神,给自己存着备用//body是要传递的参数,格式"roleId=1&uid=2"//post的cotentType填写://"application/x-www-form-urlencoded"//soap填写:"text/xml; charset=utf-8" ... 阅读全文
posted @ 2015-04-27 20:33 飞行在午夜 阅读(207) 评论(0) 推荐(0) 编辑