Ejemplo n.º 1
0
        private void CheckAddInAttribute(ResourceBOMAttribute resourceBOMAttribute, Assembly asm, XDocument dataTable)
        {
            using (var resourceStream = asm.GetManifestResourceStream(resourceBOMAttribute.ResourceName))
            {
                if (resourceStream == null)
                {
                    Logger.Error(string.Format(Messages.InternalResourceMissing, resourceBOMAttribute.ResourceName));
                }
                switch (resourceBOMAttribute.Type)
                {
                case ResourceType.UserField:
                    var userFieldBOM = b1DAO.GetBOMFromXML <UserFieldBOM>(resourceStream);
                    UpdateDataTableMissingItems(dataTable, userFieldBOM, Messages.UserField);
                    break;

                case ResourceType.UserTable:
                    var userTableBOM = b1DAO.GetBOMFromXML <UserTableBOM>(resourceStream);
                    UpdateDataTableMissingItems(dataTable, userTableBOM, Messages.UserTable);
                    break;

                case ResourceType.UDO:
                    var udoBOM = b1DAO.GetBOMFromXML <UDOBOM>(resourceStream);
                    UpdateDataTableOutdatedItems(dataTable, udoBOM, Messages.UDO);
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        private void ProcessAddInResourceAttribute(ResourceBOMAttribute resourceBOMAttribute, Assembly asm)
        {
            using (var resourceStream = asm.GetManifestResourceStream(resourceBOMAttribute.ResourceName))
            {
                if (resourceStream == null)
                {
                    Logger.Error(string.Format(Messages.InternalResourceMissing, resourceBOMAttribute.ResourceName));
                    return;
                }
                switch (resourceBOMAttribute.Type)
                {
                case ResourceType.UserField:
                    var userFieldBOM = b1DAO.GetBOMFromXML <UserFieldBOM>(resourceStream);
                    b1DAO.SaveBOMIfNotExists(userFieldBOM);
                    break;

                case ResourceType.UserTable:
                    var userTableBOM = b1DAO.GetBOMFromXML <UserTableBOM>(resourceStream);
                    b1DAO.SaveBOMIfNotExists(userTableBOM);
                    break;

                case ResourceType.UDO:
                    var udoBOM = b1DAO.GetBOMFromXML <UDOBOM>(resourceStream);
                    b1DAO.UpdateOrSaveBOMIfNotExists(udoBOM);
                    break;
                }
            }
        }
Ejemplo n.º 3
0
 private void ProcessAddInResourceAttribute(ResourceBOMAttribute resourceBOMAttribute, Assembly asm)
 {
     using (var resourceStream = asm.GetManifestResourceStream(resourceBOMAttribute.ResourceName))
     {
         if (resourceStream == null)
         {
             Logger.Error(string.Format(Messages.InternalResourceMissing, resourceBOMAttribute.ResourceName));
             return;
         }
         switch (resourceBOMAttribute.Type)
         {
             case ResourceType.UserField:
                 var userFieldBOM = b1DAO.GetBOMFromXML<UserFieldBOM>(resourceStream);
                 b1DAO.SaveBOMIfNotExists(userFieldBOM);
                 break;
             case ResourceType.UserTable:
                 var userTableBOM = b1DAO.GetBOMFromXML<UserTableBOM>(resourceStream);
                 b1DAO.SaveBOMIfNotExists(userTableBOM);
                 break;
             case ResourceType.UDO:
                 var udoBOM = b1DAO.GetBOMFromXML<UDOBOM>(resourceStream);
                 b1DAO.UpdateOrSaveBOMIfNotExists(udoBOM);
                 break;
         }
     }
 }
Ejemplo n.º 4
0
 private void CheckAddInAttribute(ResourceBOMAttribute resourceBOMAttribute, Assembly asm, XDocument dataTable)
 {
     using (var resourceStream = asm.GetManifestResourceStream(resourceBOMAttribute.ResourceName))
     {
         if (resourceStream == null)
         {
             Logger.Error(string.Format(Messages.InternalResourceMissing, resourceBOMAttribute.ResourceName));
         }
         switch (resourceBOMAttribute.Type)
         {
             case ResourceType.UserField:
                 var userFieldBOM = b1DAO.GetBOMFromXML<UserFieldBOM>(resourceStream);
                 UpdateDataTableMissingItems(dataTable, userFieldBOM, Messages.UserField);
                 break;
             case ResourceType.UserTable:
                 var userTableBOM = b1DAO.GetBOMFromXML<UserTableBOM>(resourceStream);
                 UpdateDataTableMissingItems(dataTable, userTableBOM, Messages.UserTable);
                 break;
             case ResourceType.UDO:
                 var udoBOM = b1DAO.GetBOMFromXML<UDOBOM>(resourceStream);
                 UpdateDataTableOutdatedItems(dataTable, udoBOM, Messages.UDO);
                 break;
         }
     }
 }