The console application is responsible for calculating stock run out dates and saving the calculated values into Azure’s cloud SQL database that is used in the suppliers’ section of the CMS Portal. Furthermore, the program transfers any new product images for customers’ orders.
For calculating the run out dates, the program connects to Azure’s SQL database to retrieve information about ordered and usage totals for each part. The UNION SELECT statement writes all the order and usage dates and run out date is retrieved by calculating when the first usage date will generate negative stock. This value is then saved in one of the tables. After above is done, the program transfers new product images by establishing an FTP connection. A table is used for storing copied orders’ IDs and compared against orders that have been manufactured as only at this point the images are transferred to the cloud server. The application is executed once a day using Microsoft’s Task Scheduler.
Technologies used:
Visual Studio, C#, SQL, FTP