博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

12 2012 档案

摘要:1.隐式事务(TransactionScope)超出事务范围时 如果没有手动调用Complete()方法,则不会提交事务string strConn = "server=.;uid=sa;pwd=123;database=db_test;"; string strSql = "insert into user_info (name,tel) values ('ee',13590305258)";using (TransactionScope tran = new TransactionScope()) { using (... 阅读全文
posted @ 2012-12-29 15:02 阅读(1271) 评论(0) 推荐(0) 编辑

摘要:SELECT ai_id,ai_mobile FROM dbo.ACCOUNT_INFO WHERE ai_id IN (SELECT DISTINCT ppi_ai_id FROM dbo.PAY_POS_INFO) AND ai_mobile_is_cfm=10注释: 因为PAY_POS_INFO表中存在多个相同的AIID,所以先去除表PAY_POS_INFO中的重复记录即可 阅读全文
posted @ 2012-12-27 14:56 阅读(521) 评论(0) 推荐(0) 编辑

摘要:原理: || 运算时 当满足第一个条件时 就不再执行第二个条件了...static bool GetResult(int n, ref int sum) { sum += n; return (n - 1 <= 0) || GetResult(n - 1, ref sum); } 阅读全文
posted @ 2012-12-25 14:01 阅读(483) 评论(0) 推荐(0) 编辑

摘要:冒泡排序 1 int temp; 2 int[] arrSort = new int[] { 10, 8, 3, 5, 6, 7, 9 }; 3 for (int i = 0; i < arrSort.Length; i++) 4 { 5 for (int j = i + 1; j < arrSort.Length; j++) 6 { 7 if (arrSort[j] < arrSort[i]) 8 ... 阅读全文
posted @ 2012-12-21 11:43 阅读(30025) 评论(1) 推荐(2) 编辑

摘要:1 DateTime.ParseExact("20121112111111", "yyyyMMddHHmmss", new System.Globalization.CultureInfo("zh-CN", true)) 阅读全文
posted @ 2012-12-14 10:45 阅读(194) 评论(0) 推荐(0) 编辑

摘要:Javascript代码View Code 1 $.ajax({ 2 3 url: "fromcar.ashx?methodName=toCart&callback=?", 4 contentType: "application/json;charset=utf-8", 5 type: "get",dataType: "jsonp", jsonp: "callback", 6 success: function(result) { //回调函数,result,返回值" 7 .. 阅读全文
posted @ 2012-12-12 16:21 阅读(324) 评论(0) 推荐(0) 编辑

摘要:$("#content").load("你自己的网站下的xx.aspx");在你的xx.aspx里使用WebRequest访问"http://www.baidu.com,将结果返回给js 阅读全文
posted @ 2012-12-12 15:21 阅读(10180) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示