Exigo Developer Resources

This database contains the documentation for Exigo's OData API's, as well as C# sample code and fully-realized demo applications ready to be customized for your needs. Start building downline viewers, reporting tools and shopping carts on the Exigo platform today!


Create an account Sign In

Unilevel Tree Viewer

Overview

An experimental jQuery-powered unilevel tree viewer that allows for Google Map-styled navigation and custom viewing options. Able to render many nodes at once.

Namespaces

This sample requires the following namespaces:

using ExigoWebService;
using System.Text;

Exigo API Authentication

This sample accesses the web service using the ExigoApi object:

    public ExigoApi Exigo
    {
        get
        {
            return new ExigoApi
            {
                ApiAuthenticationValue = new ApiAuthentication
                {
                    LoginName = exigoAPILoginName,
                    Password = exigoAPIPassword,
                    Company = exigoAPICompany
                }
            };
        }
    }
    

jQuery, jOrgChart and CraftMap (aka. Mobility Map)

For this experimental tree viewer, we are using jQuery and customized modifications of jOrgChart (https://github.com/wesnolte/jOrgChart) and CraftMap (formerly known as Mobility Map, http://www.jscraft.net/plugins/craftmap.html).

<link href="<%=this.ResolveUrl("Assets/Styles/jquery.jOrgChart.css") %>" rel="stylesheet" type="text/css" />
<link href="<%=this.ResolveUrl("Assets/Styles/jquery.mobilitymap.css") %>" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="<%=ResolveUrl("../../Scripts/jquery.min.js")%>"></script>
<script src="<%=ResolveUrl("Assets/Scripts/jquery.jOrgChart.js") %>" type="text/javascript"></script>
<script src="<%=ResolveUrl("Assets/Scripts/jquery.mobilymap.js") %>" type="text/javascript"></script>

Fetching Unilevel Nodes

To fetch a list of unilevel tree nodes, we use the web service's GetDownline method.

        return Exigo.GetDownline(new GetDownlineRequest
        {
            TreeType        = TreeType.UniLevel,
            CustomerID      = customerID,
            PeriodType      = periodTypeID,
            MaxLevelDepth   = 99,
            BatchSize       = RecordCount
        }).Nodes;