V4:设置,取消常用功能报错
作者:C/S框架网  发布日期:2014-04-16 09:32:14
  V4:设置,取消常用功能报错


修改BridgeFactory.cs 文件中CreateDataDictBridge(Type ORM)方法。

替换代码:



C# Code:


/// <summary>
/// 跟据ORM创建桥接功能
/// </summary>
/// <param name="ORM">ORM类</param>
/// <returns></returns>
public static IBridge_DataDict CreateDataDictBridge(Type ORM)
{
   //直连模式,返回数据访问层实例
   if (BridgeFactory.BridgeType == BridgeType.ADODirect)
   {
      if (ORM == null)
      return new dalBaseDataDict(Loginer.CurrentUser);
      
      //跟据ORM类全名自动创建对应的DAL对象实例
      dalBaseDataDict dal = dalBaseDataDict.CreateDalByORM(Loginer.CurrentUser, ORM.FullName);
      if (dal != null)
      return dal;//根据Model定义查找DAL
      else
      return new dalBaseDataDict(Loginer.CurrentUser, ORM);
   }
   
   //WCF服务模式,返回WCF服务代理实例
   if (BridgeFactory.BridgeType == BridgeType.WebService)
   return new WebService_DataDict(ORM);
   
   throw new CustomException(UNKNOW_BRIDGE_TYPE);
}

//来源:C/S框架网(www.csframework.com) QQ:1980854898



上一篇 下一篇