摘要: private void vAssetDetailDataGridView_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { if (e.Button == MouseButtons.... 阅读全文
posted @ 2014-04-22 10:49 忆森灵 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 原表:转过的表:代码:declare @sql varchar(1000)set @sql = 'select AssetRecordId 'select @sql = @sql + ' , max(case ExtendName when ''' + ExtendName + ''' thenExtendValue else null end) [' + ExtendName + ']'from (select distinct ExtendName from dbo.AssetExtend wh 阅读全文
posted @ 2014-04-04 15:01 忆森灵 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 重复字段:BarCodeSELECT * FROM dbo.AssetBarCode WHERE BarCode IN (SELECT BarCode FROM dbo.AssetBarCode GROUP BY BarCode HAVING COUNT(BarCode)>1) 阅读全文
posted @ 2014-03-28 10:48 忆森灵 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 1.根据id,两表联合删除delete photo where aid in(select aid from photo where aid=3) delete album where id=32.查询过程中数据类型强制转换select convert(varchar(50),userid),nam... 阅读全文
posted @ 2013-12-17 16:01 忆森灵 阅读(150) 评论(0) 推荐(0) 编辑
摘要: html代码:触发按钮ashx代码:获取全部信息 List list = new List(); DataSet ds = bll.getSearchAll(); if (ds.Tables[0].Rows.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { bl = new ... 阅读全文
posted @ 2013-12-13 10:21 忆森灵 阅读(401) 评论(0) 推荐(0) 编辑
摘要: input 文本框赋值$("#id").attr("赋值");input 文本框清空$("#id").attr("");div之类的赋值$("#id").html()="赋值";或者$("#id").html("赋值"); 阅读全文
posted @ 2013-12-13 09:35 忆森灵 阅读(229) 评论(0) 推荐(0) 编辑
摘要: public Image ThumbImg(Image sourceImage) { int thumbwidth = 600; int width = sourceImage.Width; int height = sourceImage.Height; if (thumbwidth >= width) { return sourceImage; } else { Image imgThumb = new System.Drawing.Bitmap(thumbwidth, height * thumbwidth / width); System.Drawing.Graphics g = 阅读全文
posted @ 2013-12-05 09:25 忆森灵 阅读(153) 评论(0) 推荐(0) 编辑
摘要: SELECT (case when a.colorder=1 then d.name else '' end) as 表名,--如果表名相同就返回空 a.colorder as 字段序号, a.name as 字段名, (case when COLUMNPROPERTY( a.id,a.name, 'IsIdentity' )=1 then '√' else '' end) as 标识, (case when (SELECT count(*) FROM sysobjects--查询主键 WHERE ... 阅读全文
posted @ 2013-11-05 17:15 忆森灵 阅读(1046) 评论(0) 推荐(0) 编辑
摘要: this.DropDownList1.Items.Insert(0,new ListItem("","")); this.DropDownList1.Items.Add(new ListItem("","")); 阅读全文
posted @ 2013-09-04 10:49 忆森灵 阅读(109) 评论(0) 推荐(0) 编辑
摘要: protected void Btn_Save_Click(object sender, EventArgs e) { string Contents = this.Txt_SmsContents.Text.Trim(); if (Request["ckEmployee"] != null) { DataTable Dt = new DataTable(); Dt.Columns.Add("Contents", typeof(string)); Dt.Columns.Add("R... 阅读全文
posted @ 2013-08-07 12:37 忆森灵 阅读(684) 评论(0) 推荐(0) 编辑