上一页 1 2 3 4 5 6 ··· 16 下一页
摘要: List l = new List();l = l.Select(a => new { a, newID = Guid.NewGuid() }).OrderBy(b => b.newID).Select(c=>c.a).ToList(); List iList = new List(); ... 阅读全文
posted @ 2014-06-16 14:42 yellowshorts 阅读(873) 评论(0) 推荐(0) 编辑
摘要: http[\:]//[^"]+ 阅读全文
posted @ 2014-04-28 16:35 yellowshorts 阅读(173) 评论(0) 推荐(0) 编辑
摘要: left left left left left center center center ... 阅读全文
posted @ 2014-03-19 10:04 yellowshorts 阅读(4797) 评论(1) 推荐(1) 编辑
摘要: jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expires = ''; if (options.expire... 阅读全文
posted @ 2014-03-19 09:56 yellowshorts 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 1.前台代码2.后台代码 protected void btnImprot_Click(object sender, EventArgs e) { String fileName = System.IO.Path.GetFileName(fupFiles.FileName); String path = Server.MapPath("~/" + fileName); fupFiles.SaveAs(path); DataTable dt = ImportExcelByDB(path); } public... 阅读全文
posted @ 2014-03-13 13:22 yellowshorts 阅读(1833) 评论(0) 推荐(0) 编辑
摘要: 执行以下SQL语句1 SELECT 2 PATINDEX('%[A-Y]%',OrderId)-1,--或得首字母出现的位置3 LEFT(OrderId, PATINDEX('%[A-Y]%',OrderId)-1),--要替换的字符串4 replace(OrderId,LEFT(OrderId, PATINDEX('%[A-Z]%',OrderId)-1),''),--替换后的结果5 OrderId,6 * FROM dbo.OrderSync 得到结果如下 阅读全文
posted @ 2014-03-13 13:19 yellowshorts 阅读(4229) 评论(0) 推荐(0) 编辑
摘要: protected void btnExcel_Click(object sender, EventArgs e) { if (GridView1.Rows.Count > 0) { ExportGridViewForUTF8(GridView1, DateTime.Now.ToShortDateString() + ".xls");//调用导出方法 } } /// /// 重载,否则出现“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标..... 阅读全文
posted @ 2014-03-04 14:47 yellowshorts 阅读(228) 评论(0) 推荐(0) 编辑
摘要: declare @delStr nvarchar(500)set @delStr=''----这边修改被注入的jsset nocount ondeclare @tableName nvarchar(100),@columnName nvarchar(100),@tbID int,@iRow int,@iResult intdeclare @sql nvarchar(500)set @iResult=0declare cur cursor forselect name,id from sysobjects where xtype='U'open curfetch 阅读全文
posted @ 2014-03-04 14:45 yellowshorts 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 1.部分类的使用 关键字partialpublic partial class TcCard{} 在使用三层架构开发项目 我们都会使用工具生成 Model层,工具生成的Model有时候不能满足我们的特殊需求 因而我们会修改Model新增一些 自己的内容 为了不和工具生成代码 每次覆盖掉我们自己更改的内容 因为我们使用部分类 来实现如图 TcCard与TcCard2属于同一个类 我们可以在两个类的文件中 对它进行编辑 而不更改工具生成的Model内容 阅读全文
posted @ 2014-02-27 10:53 yellowshorts 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 表结果如图CREATE TABLE T(id INT,NAME VARCHAR(50))INSERT INTO T SELECT 10001,'Sky,Blue,Water'INSERT INTO T SELECT 10002,'Book,Apple,Shirt'INSERT INTO T SELECT 10005,'Cup,Yellow,org'INSERT INTO T SELECT 61245,'box,phone,paper'GOSELECT id,SUBSTRING(A.NAME,B.number,CHARINDEX(& 阅读全文
posted @ 2014-02-27 10:11 yellowshorts 阅读(1849) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 16 下一页