Qty at jobsite by office

How can I get the Qty at jobsite of all the part numbers using C#. If possibleI need this summarized to the blue roof or using detail and we can roll up. if I can get the blueroof that it is under as part of the detail.

Is there any update on this. How can I get the Qty at jobsite of all of the part numbers. Is there a way I can include the jobsite name/number with that report.

Hi, Chris.shumaker.
You may get the details of a job and all parts stocked like below, which may be consolidated into any preferred format.

var job = StockingLocation.GetStockingLocation(Job-Site-Stocking-Location-ID, false);

var stockedProducts = StockedProductList.GetStockedProductList(job.StockingLocationID, Guid.Empty, ProductType.Product);

foreach (var part in stockedProducts)
Console.WriteLine($“PART-NUMBER: {part.PartNumber} DESCRIPTION: {part.Description} QTY-ON-RENT: {part.QuantityOnRent}”);

Thanks for posting.

We need this for all jobs so the job-site-location-id is not a variable that we can use so how do we get those in a full list

Hi, Chris.shumaker.

You could get the list of jobs with code similar to the one below -

StockingLocationList jobs = StockingLocationList.GetActiveJobsites(false, JobTreeNodeDisplayType.Name, Guid.Empty, false);

Thanks for posting.

I know it has been a while but I need to get the Qty at all jobsites and the get active jobs code you gave me doesn’t work. Get Active jobsites throws a compile error. Please provide a solution instead of me having to piece meal this together.

Hi Chris. Can you be specific in what the compile error is? This code works for all of our developers. Maybe you’re missing the dll references? Not sure, can only guess without more details.

The error I am getting is CS0117 StockingLocationLIst does not contain a definition for GetActiveJobsites

What I am looking for is The job number, job name, part number, Quantity in the yard, qty in repair, qty damaged, qty for rent, qty available
This is for all active jobs and blue roofs.

Hi Chris. I’ve modified the C# sample project to show this. Attached here.

Quantify.API-chris.zip (5.2 KB)

thank you but I am still getting error CS0117: ‘StockingLocationList’ does not contain a definition for ‘GetActiveJobsites’
I must be missing a dll or something. Please ltt me know which dll I am missing and I will see if I can find it.

Could be. You need to reference the 3 dll’s from the install folder.


I have those three DLLs. Is there a certain version that I need to be on in order to make this work? I was going to run an update this weekend.

That’s odd. So even the sample project has issues? The current version is 9.0.1526.126. I believe those methods have been in Quantify for a very long time though. We typically try and avoid breaking code like this.

When you highlight one of the dll’s do you have Copy Local set to true?

Only other thing I can think of is a bad Visual Studio installation? Maybe do a repair?

We ended up updating to 9.01526.126 and it started working. Thanks.