2016年12月2日

mysql 实现 row_number() over(pattition by a order by b )

摘要: SELECT prod_province,prod_cnode,prod_balance,rank FROM ( SELECT b.prod_province,b.prod_cnode,b.prod_balance,@rownum:=@rownum+1 , IF(@pdept=b.prod_prov 阅读全文

posted @ 2016-12-02 18:24 习惯简单 阅读(2697) 评论(0) 推荐(0) 编辑

2015年12月22日

WebApi Filter 中断返回字符串信息

摘要: public override void OnActionExecuting(HttpActionContext ActionContext) {string json = "{\"result\":\"true\"}";ActionContext.Response = new Ht... 阅读全文

posted @ 2015-12-22 17:23 习惯简单 阅读(473) 评论(0) 推荐(0) 编辑

2015年5月19日

windows服务定时任务

摘要: public partial class TimerByThread : ServiceBase { public TimerByThread() { InitializeComponent(); } Thread... 阅读全文

posted @ 2015-05-19 16:04 习惯简单 阅读(614) 评论(0) 推荐(0) 编辑

2014年12月2日

MVC 配置所有请求都由IIS交给.net处理

摘要: 阅读全文

posted @ 2014-12-02 13:46 习惯简单 阅读(175) 评论(0) 推荐(0) 编辑

2014年10月14日

下拉列表

摘要: 阅读全文

posted @ 2014-10-14 18:24 习惯简单 阅读(134) 评论(0) 推荐(0) 编辑

2014年7月4日

datagridview 绑定 datatable

摘要: if (dt != null) { DataGridViewColumn dgvc = null; this.dataGridView1.DataSource = null; this.... 阅读全文

posted @ 2014-07-04 15:49 习惯简单 阅读(476) 评论(0) 推荐(0) 编辑

2014年4月29日

委托例子

摘要: //一般来说,委托的 定义和执行 是在一个类里的, 绑定事件 在另一个类里,通过实例化 发布者 a,然后用 a绑定要执行的事件。namespace delegatetest{//订阅者 public class mainform {//具体要执行的方法 public voi... 阅读全文

posted @ 2014-04-29 17:12 习惯简单 阅读(179) 评论(0) 推荐(0) 编辑

2014年4月11日

sql server 事务嵌套 并行执行

摘要: ------外层事务declare @flag intset @flag=0declare @successcount intset @successcount=0declare @returnvalue intbegin tran t1while @flag0begincommit tran t1endelsebeginrollback tran t1end---内层事务(存储过程)SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOalter PROCEDURE [dbo].[testpro](@flag int)ASBEGINdeclare @tra 阅读全文

posted @ 2014-04-11 10:36 习惯简单 阅读(1354) 评论(0) 推荐(0) 编辑

2014年3月31日

ZeroClipboard js+flash 实现 复制文本到剪切板

摘要: 首先引用:ZeroClipboard.js ZeroClipboard.setMoviePath("../ZeroClipboard.swf"); $("a[name='lq']").each(function () { var id = $(this).attr("id"); var clip = new ZeroClipboard.Client(); // 新建一个对象 clip.setHandCursor(true... 阅读全文

posted @ 2014-03-31 16:14 习惯简单 阅读(204) 评论(0) 推荐(0) 编辑

2014年2月24日

C# 批量执行 sql语句 事务 参数

摘要: List SQLStringList = new List(); foreach (KeyValuePair item in datas) { SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.VarChar,10), new SqlParameter("@name", SqlDbType.Decimal) }; ... 阅读全文

posted @ 2014-02-24 11:45 习惯简单 阅读(1151) 评论(0) 推荐(0) 编辑

导航