摘要:
问题是这样嘀:项目采用了三层架构和工厂模式,并借鉴了PetShop的架构,因为这个项目也是采用分布式的数据库,目前只有三个数据库,主要出于提高访问性能考虑。原来是按照网上对PetShop的介绍来给各项目添加引用的。1、Web 引用 BLL。 2、BLL 引用 IDAL,Model,使用DALFactory创建实例。 3、IDAL 引用 Model。 4、Model 无引用。 5、DALFact... 阅读全文
摘要:
class Program { static void Main(string[] args) { Boss boss = new Boss(); Charge c = new Charge(); Employee emp = new Employee(); //订阅事件 emp.PlayGame += new Employee.JoinPlayGame(c.StopGame); emp.Play... 阅读全文
摘要:
/// <summary> /// ProgramName:委托、匿名方法和 Lambda 表达式 /// </summary> class Program { //C#1.0 Delegate Declare delegate string MyTestC1(string str); //C#2.0 Delegate Declare delegate string My... 阅读全文
摘要:
DateTime.Now=2009-7-16 5:20:56//今天DateTime.Now.Date.ToString();"2009-7-16 0:00:00"//周起始日期DateTime.Now.Date.AddDays(-(int)(DateTime.Now.DayOfWeek)+1).ToString();{2009-7-13 0:00:00}DateTime.Now.Date.Add... 阅读全文