Sage.Integration.Northwind.Application.Entities.Product.UnitOfMeasure.FillChangeLog C# (CSharp) Method

FillChangeLog() public method

public FillChangeLog ( System &table, NorthwindConfig config, Token lastToken ) : int
table System
config NorthwindConfig
lastToken Sage.Integration.Northwind.Application.API.Token
return int
        public override int FillChangeLog(out System.Data.DataTable table, NorthwindConfig config, Token lastToken)
        {
            #region Declarations
            int recordCount = 0;
            DataSets.Product changelog = new DataSets.Product();
            int lastUomID = 0;
            ChangeLogsTableAdapter tableAdapter;
            #endregion

            lastUomID = Token.GetId(lastToken);

            // get the first 11 rows of the changelog
            using (OleDbConnection connection = new OleDbConnection(config.ConnectionString))
            {
                tableAdapter = new ChangeLogsTableAdapter();
                tableAdapter.Connection = connection;
                // fill the Changelog dataset
                if (lastToken.InitRequest)
                    recordCount = tableAdapter.Fill(changelog.ChangeLogs, lastUomID, lastToken.SequenceNumber, lastToken.SequenceNumber, "");
                else
                    recordCount = tableAdapter.Fill(changelog.ChangeLogs, lastUomID, lastToken.SequenceNumber, lastToken.SequenceNumber, config.CrmUser);

            }

            table = changelog.ChangeLogs;
            return recordCount;
        }