/// <summary> /// Create a document layout from an already created DocumentPackage. Will only save document fields for one document /// in the package. /// </summary> /// <returns>The layout id.</returns> /// <param name="layout">The DocumentPackage with one document from which to create layout.</param> public string CreateLayout(DocumentPackage layout) { Package layoutToCreate = new DocumentPackageConverter(layout).ToAPIPackage(); foreach (Silanis.ESL.SDK.Document document in layout.Documents.Values) { layoutToCreate.AddDocument(new DocumentConverter(document).ToAPIDocument(layoutToCreate)); } return apiClient.CreateLayout(layoutToCreate, layout.Id.Id); }
/// <summary> /// Create a document layout from an already created DocumentPackage. Will only save document fields for one document /// in the package. /// </summary> /// <returns>The layout id.</returns> /// <param name="layout">The DocumentPackage with one document from which to create layout.</param> public string CreateLayout(DocumentPackage layout) { Package layoutToCreate = new DocumentPackageConverter(layout).ToAPIPackage(); foreach (Silanis.ESL.SDK.Document document in layout.Documents.Values) { layoutToCreate.AddDocument(new DocumentConverter(document).ToAPIDocument(layoutToCreate)); } return(apiClient.CreateLayout(layoutToCreate, layout.Id.Id)); }
/// <summary> /// Create a document layout from an already created DocumentPackage. Will only save document fields for one document /// in the package. /// </summary> /// <returns>DocumentPackage layout.</returns> /// <param name="layout">The DocumentPackage with one document from which to create layout.</param> public DocumentPackage CreateAndGetLayout(DocumentPackage layout) { Package layoutToCreate = new DocumentPackageConverter(layout).ToAPIPackage(); foreach (Silanis.ESL.SDK.Document document in layout.Documents) { layoutToCreate.AddDocument(new DocumentConverter(document).ToAPIDocument(layoutToCreate)); } Package createdLayout = apiClient.CreateAndGetLayout(layoutToCreate, layout.Id.Id); return(new DocumentPackageConverter(createdLayout).ToSDKPackage()); }
public PackageId CreatePackageOneStep(DocumentPackage package) { if (!IsSdkVersionSetInPackageData(package)) { SetSdkVersionInPackageData(package); } Silanis.ESL.API.Package packageToCreate = new DocumentPackageConverter(package).ToAPIPackage(); foreach (Silanis.ESL.SDK.Document document in package.Documents.Values) { packageToCreate.AddDocument(new DocumentConverter(document).ToAPIDocument(packageToCreate)); } PackageId id = packageService.CreatePackageOneStep(packageToCreate, package.Documents.Values); return(id); }
public PackageId CreatePackageOneStep(DocumentPackage package) { if (!IsSdkVersionSetInPackageData(package)) { SetSdkVersionInPackageData(package); } Silanis.ESL.API.Package packageToCreate = new DocumentPackageConverter(package).ToAPIPackage(); foreach(Silanis.ESL.SDK.Document document in package.Documents.Values){ packageToCreate.AddDocument(new DocumentConverter(document).ToAPIDocument(packageToCreate)); } PackageId id = packageService.CreatePackageOneStep (packageToCreate, package.Documents.Values); return id; }