예제 #1
0
        private List <ExcelEntry> GetUpdateEntries(List <Range> changedRowsWithTimeID)
        {
            List <ExcelEntry> updateEntries = new List <ExcelEntry>();

            // Loop trough each row with a Time-ID.
            foreach (Range row in changedRowsWithTimeID)
            {
                ExcelEntry buffer = ExcelEntry.FromRow(row.Row);

                // Check if the entry is ignorable.
                bool ignorable = IsIgnorableEntry(buffer);

                if (!ignorable)
                {
                    // Check if the entry is valid.
                    bool valid = ValidateExcelEntryWithTimeID(buffer);

                    if (valid)
                    {
                        updateEntries.Add(buffer);
                    }
                }
            }
            return(updateEntries);
        }
예제 #2
0
        private List <ExcelEntry> GetAddEntries(List <Range> rowsWithoutTimeID)
        {
            List <ExcelEntry> addEntries = new List <ExcelEntry>();

            // Loop through each row with no Time-ID.
            foreach (Range row in rowsWithoutTimeID)
            {
                ExcelEntry buffer = ExcelEntry.FromRow(row.Row);

                // Check if the entry is ignorable.
                bool ignorable = IsIgnorableEntry(buffer);

                if (!ignorable)
                {
                    // Check if the entry is valid.
                    bool valid = ValidateExcelEntry(buffer);

                    if (valid)
                    {
                        addEntries.Add(buffer);
                    }
                }
            }
            return(addEntries);
        }
예제 #3
0
        private List <ExcelEntry> GetRemoveEntries(List <Range> changedRowsWithTimeID)
        {
            List <ExcelEntry> removeEntries = new List <ExcelEntry>();

            // Loop trough each row with a Time-ID.
            foreach (Range row in changedRowsWithTimeID)
            {
                ExcelEntry buffer = ExcelEntry.FromRow(row.Row);

                // Check if the entry is ignorable.
                bool ignorable = IsIgnorableEntry(buffer);

                if (ignorable)
                {
                    removeEntries.Add(buffer);
                }
            }
            return(removeEntries);
        }