Core.NETCore.BI-Examples: Porovnání verzí

Z Podpora.nextis.cz
Skočit na navigaci Skočit na vyhledávání
Založena nová stránka s textem „AS“
 
Bez shrnutí editace
Řádek 1: Řádek 1:
AS
=== Calculate purchase turnover for suppliers ===
<syntaxhighlight lang="vb">
      'Total moth count to calculate turnover
        Dim TotalMonths As Integer = 12
 
        'Calculate turnover info for each month
        For MonthCurrent As Integer = 0 To TotalMonths - 1
 
            Dim Year As Integer = Now.AddMonths((Me.PO.MonthsBack + (TotalMonths - MonthCurrent)) * -1).Year
            Dim Month As Integer = Now.AddMonths((Me.PO.MonthsBack + (TotalMonths - MonthCurrent)) * -1).Month
 
            '1. Declare base BI calculation class
            Dim MonthInfo As New Core.NETCore.BI.CompanyBussinesInfo(Year, Month, Core.NETCore.BI.CompanyBussinesInfo.TurnoverTypes.GoodsByIssue)
 
            '2. Declare collection with supplier turnover info
            Dim Ti As System.Collections.Generic.SortedList(Of Integer, Core.NETCore.BI.CompanyBussinesInfo.SupplierTurnoverInfo)
 
            '3. Calculate supplier turnover info using base BI class (step 1.)
            '  FilteredInSuppliers (coma delimited string with ID's of suupliers Example "1,5688,45")
            '  FilteredOutSuppliers (coma delimited string with ID's of suupliers Example "1,5688,45")
            Ti = MonthInfo.SupplierTurnover("", "")
 
            '4. Browse and show data for each supplier info in specified month
            For Each Item As Core.NETCore.BI.CompanyBussinesInfo.SupplierTurnoverInfo In Ti.Values
                'XXXXXXXXXXXXXXXXXXXXXXXXXXXX
                'Place your code to show data, stored in [Item]
                'XXXXXXXXXXXXXXXXXXXXXXXXXXXX
            Next
        Next
</syntaxhighlight>

Verze z 11. 8. 2017, 08:42

Calculate purchase turnover for suppliers

       'Total moth count to calculate turnover
        Dim TotalMonths As Integer = 12

        'Calculate turnover info for each month
        For MonthCurrent As Integer = 0 To TotalMonths - 1

            Dim Year As Integer = Now.AddMonths((Me.PO.MonthsBack + (TotalMonths - MonthCurrent)) * -1).Year
            Dim Month As Integer = Now.AddMonths((Me.PO.MonthsBack + (TotalMonths - MonthCurrent)) * -1).Month

            '1. Declare base BI calculation class 
            Dim MonthInfo As New Core.NETCore.BI.CompanyBussinesInfo(Year, Month, Core.NETCore.BI.CompanyBussinesInfo.TurnoverTypes.GoodsByIssue)

            '2. Declare collection with supplier turnover info 
            Dim Ti As System.Collections.Generic.SortedList(Of Integer, Core.NETCore.BI.CompanyBussinesInfo.SupplierTurnoverInfo)

            '3. Calculate supplier turnover info using base BI class (step 1.)
            '   FilteredInSuppliers (coma delimited string with ID's of suupliers Example "1,5688,45")
            '   FilteredOutSuppliers (coma delimited string with ID's of suupliers Example "1,5688,45")
            Ti = MonthInfo.SupplierTurnover("", "")

            '4. Browse and show data for each supplier info in specified month
            For Each Item As Core.NETCore.BI.CompanyBussinesInfo.SupplierTurnoverInfo In Ti.Values
                'XXXXXXXXXXXXXXXXXXXXXXXXXXXX
                'Place your code to show data, stored in [Item]
                'XXXXXXXXXXXXXXXXXXXXXXXXXXXX
            Next
        Next