Dim factoryProduction As Double
Dim cargoWeight As Double
Dim cargoLoadingDate As Date
factoryProduction = GetFactoryProduction()
cargoWeight = GetCargoWeight()
Dim cargoLoadingDays As Integer
cargoLoadingDays = CalculateCargoLoadingDays(factoryProduction, cargoWeight)
cargoLoadingDate = Date.Now.AddDays(cargoLoadingDays)
DisplayCargoLoadingDateOnCalendar(cargoLoadingDate)
Private Function CalculateCargoLoadingDays(ByVal factoryProduction As Double, ByVal cargoWeight As Double) As Integer
Dim dailyCargoLoad As Double
dailyCargoLoad = factoryProduction * 8
Dim cargoLoadingDays As Integer
cargoLoadingDays = cargoWeight / dailyCargoLoad
Private Sub DisplayCargoLoadingDateOnCalendar(ByVal cargoLoadingDate As Date)
MonthView.Value = cargoLoadingDate