예제 #1
0
 public override void Update() {
     if (Session.FindObject<PersistentAssemblyInfo>(info => info.Name == MasterDetailDynamicAssembly) == null) {
         var importEngine = new ImportEngine();
         using (var unitOfWork = new UnitOfWork(Session.DataLayer)) {
             importEngine.ImportObjects(new ObjectSpace(unitOfWork), GetType(), "DynamicAssemblyMasterDetail.xml");
         }
     }
 }
예제 #2
0
파일: Updater.cs 프로젝트: aries544/eXpand
 void Import() {
     var session = ((XPObjectSpace)ObjectSpace).Session;
     if (session.FindObject<Analysis>(analysis => analysis.Name == "Controlling Grid Settings") == null) {
         var importEngine = new ImportEngine();
         Stream stream = GetType().Assembly.GetManifestResourceStream(GetType(), "AnalysisObjects.xml");
         importEngine.ImportObjects(stream, new UnitOfWork(session.DataLayer));
         stream = GetType().Assembly.GetManifestResourceStream(GetType(), "AnalysisObjectsConfiguration.xml");
         importEngine.ImportObjects(stream, new UnitOfWork(session.DataLayer));
     }
 }
예제 #3
0
파일: Updater.cs 프로젝트: kevin3274/eXpand
 public override void UpdateDatabaseAfterUpdateSchema() {
     base.UpdateDatabaseAfterUpdateSchema();
     var session = ((XPObjectSpace)ObjectSpace).Session;
     if (session.FindObject<SerializationConfigurationGroup>(@group => @group.Name == "Dynamic Assembly Master Detail") == null) {
         var importEngine = new ImportEngine();
         importEngine.ImportObjects(new UnitOfWork(session.DataLayer), GetType(), "DynamicAssemblyMasterDetailGroup.xml");
         importEngine.ImportObjects(new UnitOfWork(session.DataLayer), GetType(), "DynamicAssemblyMasterDetailModel.xml");
         importEngine.ImportObjects(new UnitOfWork(session.DataLayer), GetType(), "DynamicAssemblyMasterDetailModelGroup.xml");
     }
 }
예제 #4
0
파일: Updater.cs 프로젝트: jdraith1/eXpand
 public override void UpdateDatabaseAfterUpdateSchema() {
     base.UpdateDatabaseAfterUpdateSchema();
     var session = ((XPObjectSpace)ObjectSpace).Session;
     if (session.FindObject<SerializationConfigurationGroup>(@group => @group.Name == "Dynamic Assembly Master Detail") == null) {
         var importEngine = new ImportEngine();
         var xpoTypeInfoSource = XpandModuleBase.XpoTypeInfoSource;
         importEngine.ImportObjects(new XPObjectSpace(XafTypesInfo.Instance, xpoTypeInfoSource, () => new UnitOfWork(session.DataLayer)), GetType(), "DynamicAssemblyMasterDetailGroup.xml");
         importEngine.ImportObjects(new XPObjectSpace(XafTypesInfo.Instance, xpoTypeInfoSource, () => new UnitOfWork(session.DataLayer)), GetType(), "DynamicAssemblyMasterDetailModel.xml");
         importEngine.ImportObjects(new XPObjectSpace(XafTypesInfo.Instance, xpoTypeInfoSource, () => new UnitOfWork(session.DataLayer)), GetType(), "DynamicAssemblyMasterDetailModelGroup.xml");
     }
 }
예제 #5
0
 public override void Update() {
     if (Session.FindObject<PersistentAssemblyInfo>(info => info.Name == MasterDetailDynamicAssembly) == null) {
         var importEngine = new ImportEngine();
         importEngine.ImportObjects(new XPObjectSpace(XafTypesInfo.Instance, XpandModuleBase.XpoTypeInfoSource, () => new UnitOfWork(Session.DataLayer)), GetType(), "DynamicAssemblyMasterDetail.xml");
     }
 }