示例#1
0
 public InstallationManager(IHost host, IContentTypeManager contentTypeManager, Importer importer, IPersister persister,
     IFinder finder, ICredentialService credentialService, AdminSection adminConfig)
 {
     _host = host;
     _contentTypeManager = contentTypeManager;
     _importer = importer;
     _persister = persister;
     _finder = finder;
     _credentialService = credentialService;
     _adminConfig = adminConfig;
 }
示例#2
0
        private void Import(Importer importer, IImportRecord record)
        {
            try
            {
                if (chkSkipRoot.Checked)
                {
                    importer.Import(record, SelectedItem, ImportOptions.Children);
                    Refresh(SelectedItem, AdminFrame.Both, false);
                }
                else
                {
                    importer.Import(record, SelectedItem, ImportOptions.AllItems);
                    Refresh(record.RootItem, AdminFrame.Both, false);
                }

                ShowErrors(record);
            }
            catch (ZeusException ex)
            {
                cvImport.ErrorMessage = ex.Message;
                cvImport.IsValid = false;
                btnImportUploaded.Enabled = false;
            }
            finally
            {
                if (File.Exists(UploadedFilePath))
                    File.Delete(UploadedFilePath);
            }
        }