2014年12月19日

一句SQL搞定查询并插入

摘要: Insertintotablename(字段1,字段2)Select字段1,字段2fromtablenameWhere(条件) 阅读全文

posted @ 2014-12-19 12:35 淡定的无奈 阅读(266) 评论(0) 推荐(0) 编辑

2014年12月11日

遍历内存中的缓存

摘要: System.Web.Caching.Cache _cache = HttpRuntime.Cache; IDictionaryEnumerator CacheEnum = _cache.GetEnumerator();//ArrayList al = new ArrayList(... 阅读全文

posted @ 2014-12-11 12:20 淡定的无奈 阅读(164) 评论(0) 推荐(0) 编辑

2014年12月9日

vs2012调试时使用传统经典模式

摘要: vs2012调试时默认会是集成模式,vs2012调试时怎么使用传统模式哪?这个时候只要选中解决方案按F4,在托管管道模式里选传统模式即可! 阅读全文

posted @ 2014-12-09 15:54 淡定的无奈 阅读(2250) 评论(0) 推荐(0) 编辑

2014年12月8日

sql server log日志文件减少的方法

摘要: 随着时间的推移,你会发现数据库的日志文件会多达20G或更多,这时候你就需要以下方法了。-- 首先把数据库的恢复模式改为SimpleALTER DATABASE [数据库] SET RECOVERY SIMPLE;GO-- 缩小log文件至1M,逻辑名称可以通过sp_helpfile拿到DBCC SH... 阅读全文

posted @ 2014-12-08 16:20 淡定的无奈 阅读(500) 评论(0) 推荐(0) 编辑

2014年3月7日

jquery load的用法

摘要: $("#Load_Msg").html(""); $("#Load_Msg").css("display",""); $("#Load_Msg").load("AddVendor.aspx",function(a,b,c){ if(b=="error") $("#add_user").css("display","none"); $("#Load_Msg") 阅读全文

posted @ 2014-03-07 18:02 淡定的无奈 阅读(191) 评论(0) 推荐(0) 编辑

防止点浏览器返回按钮,返回上一页的JS方法

摘要: 希望最终停在B页,不想点B页浏览器返回按钮,返回到A页,则在A页加:$(document).ready(function(){ window.history.forward(1);}) 阅读全文

posted @ 2014-03-07 11:35 淡定的无奈 阅读(10341) 评论(3) 推荐(0) 编辑

2014年2月19日

下载Excel

摘要: //this.export_data.InnerHtml = sb.ToString(); Response.Clear(); Response.Buffer = true; Response.Charset = "utf-8"; Response.AppendHeader("Content-Disposition", "attachment;filename=RMA" + sdate + "-" + edate + ".xls"); Response.ContentEncoding = Sys 阅读全文

posted @ 2014-02-19 16:10 淡定的无奈 阅读(140) 评论(0) 推荐(0) 编辑

2013年4月25日

string.Format的用法

摘要: String where = "u_username='{0}' and u_password='{1}'";where = string.Format(where,loginuser,password); IList<users> userslist=usersBLL.Select(where,true,false); 阅读全文

posted @ 2013-04-25 10:31 淡定的无奈 阅读(149) 评论(0) 推荐(0) 编辑

2013年1月25日

dataset 转json

摘要: DataSet set = WebData1.dataSet(sql); JsonSerializerSettings settings = newJsonSerializerSettings(); settings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; StrResult = JsonConvert.SerializeObject(new { xdn = set }, Formatting.Indented, settings); 阅读全文

posted @ 2013-01-25 13:19 淡定的无奈 阅读(298) 评论(0) 推荐(0) 编辑

2013年1月7日

linq 查询

摘要: linq 分组查询:var qs = CC_.GroupBy(x => new { x.customer_name,x.sales_account,x.customer_code }).Where(Items=>Items.Key.sales_account==sales);linq 拼接:var q = from n in CC_ select n; if (keys=="none"&& keys1=="") { q = q.Where(p => p.sales_account==sales); }... 阅读全文

posted @ 2013-01-07 13:08 淡定的无奈 阅读(221) 评论(0) 推荐(0) 编辑

导航