Exemplo n.º 1
0
        static DateProvider()
        {
            //。net能保证这里的代码只执行一次
            //   todo: 根据web.config动态反射实例化数据工厂的实例
            string dllfileName         = System.Web.Configuration.WebConfigurationManager.AppSettings["DataProviderDllFile"];
            string dalfactoryClassName = System.Web.Configuration.WebConfigurationManager.AppSettings["DataProviderFactoryName"];
            string path = System.Web.HttpContext.Current.Server.MapPath("~/dataproviders/" + dllfileName);

            System.Reflection.Assembly dll = System.Reflection.Assembly.LoadFile(path);
            _instance = dll.CreateInstance(dalfactoryClassName) as OA.DALFactory.DalFactory;
        }
Exemplo n.º 2
0
 public int update(Entity.机构 obj)
 {
     OA.DALFactory.DalFactory datafactory = null;
     return(datafactory.Dal机构Provider.Update(obj));
 }