This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET | |
public class Customer | |
{ | |
public String CustomerName { get; set; } | |
public string ShippingAddress { get; set; } | |
public string CustomerContactNumber { get; set; } | |
public IEnumerable<Order> Order { get; set; } | |
public String Photo { get { return Path.Combine(Path.GetFullPath(imagePath), "no-photo.jpg"); } } | |
} | |
public class Order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET | |
Public Class Customer | |
Public Property CustomerName() As [String] | |
Get | |
Return m_CustomerName | |
End Get | |
Set(value As [String]) | |
m_CustomerName = Value | |
End Set | |
End Property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET | |
''' <summary> | |
''' Takes source file name as argument. | |
''' </summary> | |
''' <param name="sourceFileName">Source file name</param> | |
''' <returns>Returns explicit path by combining source folder path and source file name.</returns> | |
Public Shared Function GetSourceDocument(sourceFileName As String) As String | |
Return Path.Combine(Path.GetFullPath(sourceFolderPath), sourceFileName) | |
End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET | |
/// <summary> | |
/// Takes source file name as argument. | |
/// </summary> | |
/// <param name="sourceFileName">Source file name</param> | |
/// <returns>Returns explicit path by combining source folder path and source file name.</returns> | |
public static string GetSourceDocument(string sourceFileName) | |
{ | |
return Path.Combine(Path.GetFullPath(sourceFolderPath), sourceFileName); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET | |
/// <summary> | |
/// Fetches customer details of very first customer | |
/// </summary> | |
/// <returns>Returns first customer's infromation</returns> | |
public static BusinessObjects.Customer GetCustomerData() | |
{ | |
IEnumerator<BusinessObjects.Customer> customer = PopulateData().GetEnumerator(); | |
customer.MoveNext(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET | |
''' <summary> | |
''' Fetches customer details of very first customer | |
''' </summary> | |
''' <returns>Returns first customer's infromation</returns> | |
Public Shared Function GetCustomerData() As BusinessObjects.Customer | |
Dim customer As IEnumerator(Of BusinessObjects.Customer) = PopulateData().GetEnumerator() | |
customer.MoveNext() | |
Return customer.Current |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET | |
/// <summary> | |
/// Fetches order details from PopulateData | |
/// </summary> | |
/// <returns>Returns order details, one data at a time</returns> | |
public static IEnumerable<BusinessObjects.Order> GetOrdersData() | |
{ | |
foreach (BusinessObjects.Customer customer in PopulateData()) | |
{ | |
foreach (BusinessObjects.Order order in customer.Order) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET | |
/// <summary> | |
/// Fetches product details from PopulateData | |
/// </summary> | |
/// <returns>Returns product details, one data at a time</returns> | |
public static IEnumerable<BusinessObjects.Product> GetProductsData() | |
{ | |
foreach (BusinessObjects.Customer customer in PopulateData()) | |
{ | |
foreach (BusinessObjects.Order order in customer.Order) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET | |
''' <summary> | |
''' Fetches product details from PopulateData | |
''' </summary> | |
''' <returns>Returns product details, one data at a time</returns> | |
Public Shared Iterator Function GetProductsData() As IEnumerable(Of BusinessObjects.Product) | |
For Each customer As BusinessObjects.Customer In PopulateData() | |
For Each order As BusinessObjects.Order In customer.Order | |
Yield order.Product | |
Next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET | |
'Setting up source document template | |
Const strDocumentTemplate As [String] = "Word Templates/Bubble Chart.docx" | |
'Setting up destination document report | |
Const strDocumentReport As [String] = "Word Reports/Bubble Chart Report.docx" | |
Try | |
'Instantiate DocumentAssembler class | |
Dim assembler As New DocumentAssembler() | |
'Call AssembleDocument to generate Bubble Chart Report in document format | |
assembler.AssembleDocument(CommonUtilities.GetSourceDocument(strDocumentTemplate), CommonUtilities.SetDestinationDocument(strDocumentReport), DataLayer.GetOrdersData(), "orders") |
OlderNewer