Beispiel #1
0
        public void Add(WorkBoxDetails workBox)
        {
            if (this.PathToTeam.Equals(workBox.OwningTeam))
            {
                if (!String.IsNullOrEmpty(workBox.WorkBoxURL))
                {
                    totalWorkBoxes++;
                    if (workBox.IsOpen)
                    {
                        totalOpenWBs++;
                    }
                    if (workBox.IsClosed)
                    {
                        totalClosedWBs++;
                    }
                }
                if (workBox.FoundDocuments)
                {
                    if (workBox.IsOpen)
                    {
                        totalDocsInOpenWBs  += workBox.NumDocuments;
                        SizeOfDocsInOpenWBs += workBox.TotalSizeOfFiles;
                    }

                    if (workBox.IsClosed)
                    {
                        totalDocsInClosedWBs  += workBox.NumDocuments;
                        SizeOfDocsInClosedWBs += workBox.TotalSizeOfFiles;
                    }

                    totalDocsInAllWBs  += workBox.NumDocuments;
                    SizeOfDocsInAllWBs += workBox.TotalSizeOfFiles;
                }
            }
        }
Beispiel #2
0
        public void Add(WorkBoxDetails workBox)
        {
            // We're only interested to count work boxes that have been opened and that use the given records type:
            if (workBox.hasBeenOpened && RecordsType.Equals(workBox.RecordsType))
            {
                totalWorkBoxes++;
                if (workBox.IsOpen)
                {
                    totalOpenWBs++;
                }
                if (workBox.IsClosed)
                {
                    totalClosedWBs++;
                }
                if (workBox.IsDeleted)
                {
                    totalDeletedWBs++;
                }

                if (DateFirstUsed > workBox.DateOpened)
                {
                    DateFirstUsed = workBox.DateOpened;
                }
                if (DateLastUsed < workBox.DateOpened)
                {
                    DateLastUsed = workBox.DateOpened;
                }

                if (workBox.FoundDocuments)
                {
                    if (workBox.IsOpen)
                    {
                        totalDocsInOpenWBs  += workBox.NumDocuments;
                        SizeOfDocsInOpenWBs += workBox.TotalSizeOfFiles;
                    }

                    if (workBox.IsClosed)
                    {
                        totalDocsInClosedWBs  += workBox.NumDocuments;
                        SizeOfDocsInClosedWBs += workBox.TotalSizeOfFiles;
                    }

                    totalDocsInAllWBs  += workBox.NumDocuments;
                    SizeOfDocsInAllWBs += workBox.TotalSizeOfFiles;
                }
            }
        }
Beispiel #3
0
        public void Add(WorkBoxDetails workBox)
        {
            if (workBox.FunctionalArea.Equals(this.FunctionalArea))
            {
                numberOfEntries++;
                if (!String.IsNullOrEmpty(workBox.FunctionalArea))
                {
                    totalWorkBoxes++;
                    if (workBox.IsOpen)
                    {
                        totalOpenWBs++;
                    }
                    if (workBox.IsClosed)
                    {
                        totalClosedWBs++;
                    }
                }
                if (workBox.FoundDocuments)
                {
                    if (workBox.IsOpen)
                    {
                        totalDocsInOpenWBs  += workBox.NumDocuments;
                        SizeOfDocsInOpenWBs += workBox.TotalSizeOfFiles;
                    }

                    if (workBox.IsClosed)
                    {
                        totalDocsInClosedWBs  += workBox.NumDocuments;
                        SizeOfDocsInClosedWBs += workBox.TotalSizeOfFiles;
                    }

                    totalDocsInAllWBs  += workBox.NumDocuments;
                    SizeOfDocsInAllWBs += workBox.TotalSizeOfFiles;
                }
            }
        }
Beispiel #4
0
        public void Add(WorkBoxDetails workBox)
        {
            bool isMultiTeamsWBs = false;

            // Working out just the planned deletions information - based on deleted date or retention end date for planned deletions
            if (workBox.hasBeenDeleted && workBox.DateDeleted < this.NextDate)
            {
                totalDeleted++;
            }
            else
            {
                if (workBox.willBeDeleted && workBox.DateToBeDeleted < this.NextDate)
                {
                    totalDeleted++;
                    if (workBox.FoundDocuments)
                    {
                        totalDocsInWBToDelete       += workBox.NumDocuments;
                        totalSizeOfDocsInWBToDelete += workBox.TotalSizeOfFiles;
                    }
                    if (workBox.DateToBeDeleted >= this.Date)
                    {
                        totalToDelete++;
                    }
                }
            }

            // We're only intersted to do the other calculations if the date for this month is this month or ealier.
            if (Date > DateTime.Now)
            {
                return;
            }

            // We're only interested to count work boxes that had been created within this month (between 'Date' and 'NextDate')
            if (workBox.hasBeenCreated && workBox.DateCreated < this.NextDate)
            {
                // WorkBoxes.Add(workBox);

                numberOfWorkBoxes++;

                if (workBox.hasBeenOpened)
                {
                    if (workBox.FoundDocuments)
                    {
                        totalNumDocsInWBs    += workBox.NumDocuments;
                        totalSizeOfDocsInWBs += workBox.TotalSizeOfFiles;
                    }


                    if (!String.IsNullOrEmpty(workBox.OwningTeam))
                    {
                        if (!owningTeams.Contains(workBox.OwningTeam))
                        {
                            owningTeams.Add(workBox.OwningTeam);
                        }
                    }

                    if (!String.IsNullOrEmpty(workBox.InvolvedTeams))
                    {
                        String[] teams = workBox.InvolvedTeams.Split(';');

                        foreach (string team in teams)
                        {
                            if (!team.Equals(workBox.OwningTeam))
                            {
                                isMultiTeamsWBs = true;

                                if (!involvedTeams.Contains(team))
                                {
                                    involvedTeams.Add(team);
                                }
                            }
                        }
                        if (isMultiTeamsWBs)
                        {
                            totalMultiTeamsWBs++;
                        }
                    }

                    if (!String.IsNullOrEmpty(workBox.VisitingTeams))
                    {
                        String[] teams = workBox.VisitingTeams.Split(';');
                        foreach (string team in teams)
                        {
                            if (!team.Equals(workBox.OwningTeam))
                            {
                                if (!visitingTeams.Contains(team))
                                {
                                    visitingTeams.Add(team);
                                }
                            }
                        }
                    }

                    if (!String.IsNullOrEmpty(workBox.InvolvedIndividuals))
                    {
                        String[] users = workBox.InvolvedIndividuals.Split(';');
                        foreach (string user in users)
                        {
                            if (!involvedIndividuals.Contains(user))
                            {
                                involvedIndividuals.Add(user);
                            }
                        }
                    }

                    if (!String.IsNullOrEmpty(workBox.VisitingIndividuals))
                    {
                        String[] users = workBox.VisitingIndividuals.Split(';');
                        foreach (string user in users)
                        {
                            if (!visitingIndividuals.Contains(user))
                            {
                                visitingIndividuals.Add(user);
                            }
                        }
                    }
                }


                if (workBox.hasBeenCreated && workBox.DateCreated >= this.Date && workBox.DateCreated < this.NextDate)
                {
                    numWBCreated++;
                }

                if (workBox.hasBeenOpened && workBox.DateOpened >= this.Date && workBox.DateOpened < this.NextDate)
                {
                    numWBOpened++;
                }

                if (workBox.hasBeenClosed && workBox.DateClosed >= this.Date && workBox.DateClosed < this.NextDate)
                {
                    numWBClosed++;
                }

                if (workBox.hasBeenDeleted && workBox.DateDeleted >= this.Date && workBox.DateDeleted < this.NextDate)
                {
                    numWBDeleted++;
                }

                if (workBox.hasBeenModified && workBox.DateLastModified >= this.Date && workBox.DateLastModified < this.NextDate)
                {
                    numWBLastModified++;
                }

                if (workBox.hasBeenVisited && workBox.DateLastVisited >= this.Date && workBox.DateLastVisited < this.NextDate)
                {
                    numWBLastVisited++;
                }

                // Note we're looking for the last state of the work box in the month between 'Date' and 'NextDate':
                if (workBox.hasBeenDeleted && workBox.DateDeleted < this.NextDate)
                {
                    numWBInDeletedState++;
                }
                else
                {
                    if (workBox.hasBeenClosed && workBox.DateClosed < this.NextDate)
                    {
                        numWBInClosedState++;
                        if (workBox.FoundDocuments)
                        {
                            numDocsInClosedWBs    += workBox.NumDocuments;
                            sizeOfDocsInClosedWBs += workBox.TotalSizeOfFiles;
                        }
                    }
                    else
                    {
                        if (workBox.hasBeenOpened && workBox.DateOpened < this.NextDate)
                        {
                            numWBInOpenState++;
                            if (workBox.FoundDocuments)
                            {
                                numDocsInOpenWBs    += workBox.NumDocuments;
                                sizeOfDocsInOpenWBs += workBox.TotalSizeOfFiles;
                            }
                            if (isMultiTeamsWBs)
                            {
                                openMultiTeamsWBs++;
                            }
                        }
                        else
                        {
                            if (workBox.hasBeenCreated && workBox.DateCreated < this.NextDate)
                            {
                                numWBInCreatedState++;
                            }
                        }
                    }
                }
            }
        }