How do I got the hierarchy of a jobsite, the blue roofs a jobsite is under in separate columns?
For example: our hierarchy
Merit Shop, Atlantic, Northeast, BranchOffice Name, Jobsite Name
Hi Chris. It’s a tough programming task for sure. You have a few options.
There is a method used to create the treeview which may help you? It returns a System.Windows.Forms.TreeView object that you can traverse the nodes on. The class is StockingLocationOrganization.BuildTreeView(). Details on the TreeView control are here: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.treeview?view=net-5.0
Otherwise, each stocking location has a parent ID and if you retrieve them all in a list you can use something like a recursive linq query to build a hierarchy. This should point you in the right direction: https://stackoverflow.com/questions/20974248/recursive-hierarchy-recursive-query-using-linq