Пример #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
 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
 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
 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");
     }
 }