public ActionResult ExportPackage(DeploymentViewModel.ExportViewModel exportForm) { var model = _deploymentViewModelBuilder.Build(ShowExport()); if (!Guid.TryParse(exportForm.ChannelSystemId, out var channelSystemId) || !Guid.TryParse(exportForm.FolderSystemId, out var folderSystemId)) { return(View(nameof(Index), model)); } var channel = _channelService.Get(channelSystemId); _package.Type = channel.Localizations.CurrentCulture.Name.Replace(" ", ""); var website = _websiteService.Get(channel.WebsiteSystemId.GetValueOrDefault()); var assortment = GetAssortment(channel); if (assortment == null) { return(View(nameof(Index), model)); } var deliveryMethodCarriers = ModuleECommerce.Instance.DeliveryMethods.GetAll().Select(x => x.GetAsCarrier()).ToList(); var paymentMethodCarriers = ModuleECommerce.Instance.PaymentMethods.GetAll().Select(paymentMethod => paymentMethod.GetAsCarrier()).ToList(); var structureInfo = _packageService.Export(new PackageInfo { Assortment = assortment, Folder = _folderService.Get(folderSystemId), Channel = channel, Website = website, DeliveryMethods = deliveryMethodCarriers, PaymentMethods = paymentMethodCarriers, }); _package.PersistStructureInfo(structureInfo); model.ExportMessage = "accelerator.deployment.export.success".AsAngularResourceString(); return(View(nameof(Index), model)); }