摘要: 该类封装了 MongoDB的一些常用操作,使用只需要从该类继承,并实现GetDataBaseName() 获取数据库名称方法 和 GetCollectionName()获取集合名称,即可实现MongoDB的CRUD操作,该基类带一个MongoDB 分页方法。 using System;using System.Collections.Generic;using System.Linq;using System.Text;using MongoDB.Driver;using MongoDB.Bson;using MongoDB.Driver.Builders;namespace sc.Mongo 阅读全文
posted @ 2013-06-12 12:26 135 阅读(335) 评论(1) 推荐(0) 编辑
摘要: 1.要试用DAAB,首先要引用两个类库 第一个是Enterprise Library Shared Library 这个类库是所有Enterprist Library都必须引用的类库,它提供所需的结构类型. 第二个是Enterprist Library Data Access Application Block 这个就是daab的核心类库. 2试用DAAB的第一个步骤就是... 阅读全文
posted @ 2013-01-21 12:02 135 阅读(235) 评论(0) 推荐(0) 编辑
摘要: Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM Select CONVERT(varchar(100), GETDATE(), 1): 05/16/06 Select CONVERT(varchar(100), GETDATE(), 2): 06.05.16 Select CONVERT(varchar(100), GETDATE(), 3): 16/05/06 Select CONVERT(varchar(100), GETDATE(), 4): 16.05.06 Select CONVERT(varchar(10 阅读全文
posted @ 2011-10-05 22:24 135 阅读(544) 评论(0) 推荐(0) 编辑
摘要: 所谓委托,可以当作是一个指向函数的指针,但是C#的委托可以同时指向多个函数,也就是支持多路广播。简单的委托示例1classMathClass2{3publicdelegateintDelClick(inta);45publicstaticintD1(intinput)6{7Console.WriteLine(input);8returninput;9}1011publicstaticintD2(intinput)12{13Console.WriteLine(input+1);14returninput+1;15}1617publicDelClickdelClick=newDelClick(D1 阅读全文
posted @ 2011-09-25 18:16 135 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 如下代码:string strA = "asdfasdf";string strB = strA;此时 strB指向的其实是"asdfasdf" 而不是strA,所以改变strA的值strB不会变。同样改变strB的值其实是改变strB的指向所以A也不会变。 阅读全文
posted @ 2011-09-12 12:46 135 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 1 set ANSI_NULLS ON 2 set QUOTED_IDENTIFIER ON 3 go 4 5 6 7 -- ============================================= 8 -- Author: <付利军> 9 -- Create date: <Create Date, ,> 10 -- Description: <Description, ,> 11 -- ============================================= 12 CREATE FUNCTION [dbo].[... 阅读全文
posted @ 2011-09-08 02:25 135 阅读(475) 评论(0) 推荐(0) 编辑
摘要: public class A { public virtual void Print() {} int x; int y; public A() { Print(); } } public class B:A { public override void Print() { Console.WriteLine("xyz"); } public B() { } } static void Main() { B b = new B();//此时输出XYZ } } 阅读全文
posted @ 2011-09-07 15:27 135 阅读(162) 评论(0) 推荐(0) 编辑
摘要: SELECT a.表名,a.字段名,a.类型和长度,a.可否为空,b.text as 默认值 from (select A.name as 表名,b.name as 字段名,c.name+ '( '+cast(b.length as varchar)+ ') ' as 类型和长度,b.isnullable as 可否未空,B.cdefault from sysobjects A ,syscolumns B,systypes C where A.xtype= 'u ' and a.id=b.id and B.xusertype=c.xusertyp 阅读全文
posted @ 2011-09-02 21:39 135 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1.首先打开水晶报表的字段资源管理器。2.在组名字段中新建一个组。3.在组所在行中,右键插入-》汇总,然后设置字段,设置计算汇总方式。汇总位置选择刚才新建的组。 阅读全文
posted @ 2011-08-31 16:09 135 阅读(626) 评论(0) 推荐(0) 编辑
摘要: 1SqlParameter[]paras=newSqlParameter[3];23paras[0]=newSqlParameter("@snrulecode",rulecode);4paras[1]=newSqlParameter("@formval",null);5paras[2]=newSqlParameter("@resVal",SqlDbType.VarChar,200);//传出参数必须指定大小6paras[2].Direction=ParameterDirection.Output;78SqlHelper.Execute 阅读全文
posted @ 2011-07-26 00:57 135 阅读(1458) 评论(1) 推荐(1) 编辑