摘要:上次写的DBML存储过程返回值虽然可以返回非Int的值,但是有个小毛病。重新拖表或者存储过程,返回值又变成了<Return Type="System.Int32" /> <Table Name="dbo.Contract" Member="Contracts"> <Type Name="Contract" Id="ID1"> <Column Name="... 阅读全文
Sql Paging
2009-08-31 19:10 by 蜡笔小旧, 237 阅读, 0 推荐, 收藏, 编辑
摘要:以NorthWind为例: (1)两次排序CREATE PROC dbo.GetCategories@PageSize int,@PageNum intASDECLARE @Ignore intDECLARE @LastID intIF @PageNum > 1 BEGIN SET @Ignore = @PageSize * ( @PageNum -1 ) SET ROWCOUNT @I... 阅读全文
DBML存储过程返回值
2009-08-31 15:45 by 蜡笔小旧, 348 阅读, 1 推荐, 收藏, 编辑
摘要: [Function(Name="dbo.Search")] public int Search([Parameter(Name="KeyWord", DbType="NVarChar(100)")] string keyWord, [Parameter(Name="PageSize", DbTyp... 阅读全文
行变列
2009-08-25 11:15 by 蜡笔小旧, 150 阅读, 0 推荐, 收藏, 编辑
摘要:ALTER FUNCTION dbo.GetFullTextJoinStringAmount( @ObjId UNIQUEIDENTIFIER, @condition NVARCHAR(100))RETURNS VARCHAR(1000)ASBEGIN DECLARE @a VARCHAR(1000) SELECT @a = ISNULL(@a+',','') + CAST(Amount AS ... 阅读全文
ienumerable ienumerator
2009-08-18 13:41 by 蜡笔小旧, 135 阅读, 0 推荐, 收藏, 编辑
摘要:http://www.xue5.com/itedu/200802/105266.html http://www.cnblogs.com/illele/archive/2008/04/21/1164696.html http://codebetter.com/blogs/david.hayden/archive/2005/03/08/59419.aspx http://blog.colinma... 阅读全文
Simple NameValueCollection
2009-08-17 12:57 by 蜡笔小旧, 127 阅读, 0 推荐, 收藏, 编辑
摘要:public class SimpleNameValueCollection { private Hashtable m_entriesTable; public SimpleNameValueCollection() { m_entriesTable = new Hashtable(); } public void Add(string key, string value) { ArrayLis... 阅读全文
RDLC - 默认的RDLC文档
2009-08-13 19:08 by 蜡笔小旧, 465 阅读, 0 推荐, 收藏, 编辑
摘要:<?xml version="1.0" encoding="utf-8"?><Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.mic... 阅读全文
Foreach。Collection was modified; enumeration operation may not execute."的错误。
2009-07-29 14:33 by 蜡笔小旧, 967 阅读, 0 推荐, 收藏, 编辑
摘要:Foreach … IN 不能修改集合内容 用for就OK了。 阅读全文