Exemple #1
0
        public Object this[String title]
        {
            get
            {
                if (RowIndex == -1 || DataSheet == null)
                {
                    return(null);
                }

                DataSheet <RecordsDetails> sheet = (DataSheet <RecordsDetails>)DataSheet;

                return(sheet.Columns[title][RowIndex]);
            }
        }
Exemple #2
0
        public override void ConfigureDataSheet <T>(DataSheet <T> datasheet)
        {
            datasheet.AddTextColumn("ERROR?", 23);
            datasheet.AddTextColumn("Exception Details", 14);
            datasheet.AddTextColumn("WBC URL", 20);
            datasheet.AddTextColumn("ID", 20);
            datasheet.AddTextColumn("Title", 20);
            datasheet.AddTextColumn("Status", 20);
            datasheet.AddTextColumn("WorkBoxStatusChangeRequest", 20);
            datasheet.AddTextColumn("WorkBoxURL", 20);
            datasheet.AddTextColumn("WorkBoxGUID", 20);
            datasheet.AddTextColumn("WorkBoxLocalID", 20);
            datasheet.AddTextColumn("WorkBoxUniqueID", 20);
            datasheet.AddTextColumn("Short Title", 20);
            datasheet.AddTextColumn("WorkBoxAuditLog", 20);
            datasheet.AddTextColumn("WorkBoxErrorMessage", 20);
            datasheet.AddTextColumn("WorkBoxCachedListItemID", 20);
            datasheet.AddDateColumn("Modified (approx)");
            datasheet.AddDateColumn("Visited (approx)");
            datasheet.AddDateColumn("Created");
            datasheet.AddDateColumn("Deleted");
            datasheet.AddDateColumn("Closed");
            datasheet.AddDateColumn("Opened");
            datasheet.AddDateColumn("Retention End Date");
            datasheet.AddTextColumn("Functional Area", 20);
            datasheet.AddTextColumn("Records Type", 20);
            datasheet.AddTextColumn("Reference ID", 20);
            datasheet.AddTextColumn("Reference Date", 20);
            datasheet.AddTextColumn("Series Tag", 20);
            datasheet.AddTextColumn("Owning Team", 20);
            datasheet.AddTextColumn("Involved Teams", 20);
            datasheet.AddTextColumn("Visiting Teams", 20);
            datasheet.AddTextColumn("Involved Individuals", 20);
            datasheet.AddTextColumn("Visiting Individuals", 20);
            datasheet.AddTextColumn("Involved Individuals Emails", 20);
            datasheet.AddTextColumn("Visiting Individuals Emails", 20);
            datasheet.AddTextColumn("Found Documents", 10);
            datasheet.AddIntegerColumn("Num Documents", 10);
            datasheet.AddLongColumn("Total Size of Docs", 10);

            datasheet.AddTextColumn("Owning Team + !Open", 20);
            datasheet.AddTextColumn("URL + !Open", 20);

            KeyRetentionPeriods.Add("Freedom of Information/FOI Case file", 3);
            KeyRetentionPeriods.Add("ICT Projects/Structured", 7);
            KeyRetentionPeriods.Add("Information/Advice and information", 3);
            KeyRetentionPeriods.Add("Team management/Team meetings", 3);
            KeyRetentionPeriods.Add("Team management/Team projects", 3);
        }
Exemple #3
0
        /*
         * private void calculateMonthlyFiguresWithFOI(Excel.Workbook processed, DataSheet<WorkBoxDetails> allWorkBoxes)
         * {
         *  // Now the monthly figures with FOI included:
         *  DataSheet<FiguresForOneMonth> monthlyFiguresWithFOI = new DataSheet<FiguresForOneMonth>(processed, "Monthly Figures w FOI");
         *  DateTime monthWalker = new DateTime(2012, 01, 01);
         *
         *  // First add all of the months up until today:
         *  while (monthWalker < DateTime.Now)
         *  {
         *      monthlyFiguresWithFOI.Add(new FiguresForOneMonth(monthWalker));
         *      monthWalker = monthWalker.AddMonths(1);
         *  }
         *
         *
         *  // Now add all of the work boxes to each of the relevant months:
         *  foreach (WorkBoxDetails workBox in allWorkBoxes)
         *  {
         *      if (!workBox.LoadedOK)
         *      {
         *          continue;
         *      }
         *
         *      try
         *      {
         *          if (workBox.hasBeenCreated)
         *          {
         *              monthWalker = (new DateTime(workBox.DateCreated.Year, workBox.DateCreated.Month, 1)).AddMonths(-1);
         *
         *              while (monthWalker < DateTime.Now)
         *              {
         *                  FiguresForOneMonth month = monthlyFiguresWithFOI[monthWalker.Date.Month + " " + monthWalker.Date.Year];
         *
         *                  if (month != null) month.Add(workBox);
         *
         *                  monthWalker = monthWalker.AddMonths(1);
         *              }
         *
         *          }
         *
         *      }
         *      catch (Exception exception)
         *      {
         *      }
         *  }
         *
         *  monthlyFiguresWithFOI.SaveToSheet();
         * }
         */

        private void calculateUsedRecordsTypesFigures(Excel.Workbook processed)
        {
            // Now we're going to work out the figures for each records type
            DataSheet <FiguresForOneRecordsType> recordsTypesFigures = new DataSheet <FiguresForOneRecordsType>(processed, "Used Records Types", true);

            foreach (WorkBoxDetails workBox in AllWorkBoxes)
            {
                if (!workBox.LoadedOK || !workBox.hasBeenOpened || String.IsNullOrEmpty(workBox.RecordsType))
                {
                    continue;
                }

                FiguresForOneRecordsType figuresForRecordsType = recordsTypesFigures[workBox.RecordsType];
                if (figuresForRecordsType == null)
                {
                    figuresForRecordsType = new FiguresForOneRecordsType(workBox.RecordsType);
                    recordsTypesFigures.Add(figuresForRecordsType);

                    RecordsTypesDetails details = AllRecordsTypes[workBox.RecordsType];
                    figuresForRecordsType.SetRecordsTypeDetails(details);
                }

                figuresForRecordsType.Add(workBox);
            }

            foreach (RecordsDetails record in AllRecords)
            {
                if (!record.LoadedOK || String.IsNullOrEmpty(record.RecordsType))
                {
                    continue;
                }

                FiguresForOneRecordsType figuresForRecordsType = recordsTypesFigures[record.RecordsType];
                if (figuresForRecordsType == null)
                {
                    figuresForRecordsType = new FiguresForOneRecordsType(record.RecordsType);
                    recordsTypesFigures.Add(figuresForRecordsType);

                    RecordsTypesDetails details = AllRecordsTypes[record.RecordsType];
                    figuresForRecordsType.SetRecordsTypeDetails(details);
                }

                figuresForRecordsType.Add(record);
            }



            recordsTypesFigures.SaveToSheet();
        }
Exemple #4
0
        public override void LoadFromRow <T>(DataSheet <T> datasheet, int rowIndex)
        {
            Name        = (String)datasheet.Columns["Name"][rowIndex];
            AccountName = (String)datasheet.Columns["Account Name"][rowIndex];
            Email       = (String)datasheet.Columns["Email"][rowIndex];

            if (datasheet.Columns["Oldest Visit Date"].HasValue(rowIndex))
            {
                VisitedAnyWB        = true;
                OldestVisitDate     = (DateTime)datasheet.Columns["Oldest Visit Date"][rowIndex];
                MostRecentVisitDate = (DateTime)datasheet.Columns["Most Recent Visit Date"][rowIndex];
            }

            PropertyLength  = (int)datasheet.Columns["Property Length"][rowIndex];
            NumOfRecordedWB = (int)datasheet.Columns["Num of Recorded WB"][rowIndex];
            WBDetails       = (String)datasheet.Columns["WB Details"][rowIndex];
        }
Exemple #5
0
        public override void LoadFromRow <T>(DataSheet <T> datasheet, int rowIndex)
        {
            Name     = (String)datasheet.Columns["Records Type Name"][rowIndex];
            FullPath = (String)datasheet.Columns["Records Type Full Path"][rowIndex];

            if (datasheet.Columns["Date Created"].HasValue(rowIndex))
            {
                hasBeenCreated = true;
                DateCreated    = (DateTime)datasheet.Columns["Date Created"][rowIndex];
            }

            if (datasheet.Columns["Date Last Modified"].HasValue(rowIndex))
            {
                hasBeenModified  = true;
                DateLastModified = (DateTime)datasheet.Columns["Date Last Modified"][rowIndex];
            }
        }
Exemple #6
0
        public override void ConfigureDataSheet <T>(DataSheet <T> datasheet)
        {
            datasheet.AddTextColumn("Work Box Collection URL", 40);

            datasheet.AddIntegerColumn("Total Entries", 20);

            datasheet.AddIntegerColumn("Total Open WBs", 20);
            datasheet.AddIntegerColumn("Total Closed WBs", 20);
            datasheet.AddIntegerColumn("Total Work Boxes", 20);

            datasheet.AddIntegerColumn("Total Docs in Open WBs", 20);
            datasheet.AddIntegerColumn("Total Docs in Closed WBs", 20);
            datasheet.AddIntegerColumn("Total Docs in All WBs", 20);

            datasheet.AddFileSizeMBColumn("Size of Docs in Open WBs", 20);
            datasheet.AddFileSizeMBColumn("Size of Docs in Closed WBs", 20);
            datasheet.AddFileSizeMBColumn("Size of Docs in All WBs", 20);
        }
Exemple #7
0
        public override void SaveToRow <T>(DataSheet <T> datasheet, int rowIndex)
        {
            Columns = datasheet.Columns;

            Columns["Work Box Collection URL"][rowIndex] = WorkBoxCollectionURL;
            Columns["Total Entries"][rowIndex]           = numberOfEntries;

            Columns["Total Open WBs"][rowIndex]   = totalOpenWBs;
            Columns["Total Closed WBs"][rowIndex] = totalClosedWBs;
            Columns["Total Work Boxes"][rowIndex] = totalWorkBoxes;

            Columns["Total Docs in Open WBs"][rowIndex]   = totalDocsInOpenWBs;
            Columns["Total Docs in Closed WBs"][rowIndex] = totalDocsInClosedWBs;
            Columns["Total Docs in All WBs"][rowIndex]    = totalDocsInAllWBs;

            Columns["Size of Docs in Open WBs"][rowIndex]   = SizeOfDocsInOpenWBs;
            Columns["Size of Docs in Closed WBs"][rowIndex] = SizeOfDocsInClosedWBs;
            Columns["Size of Docs in All WBs"][rowIndex]    = SizeOfDocsInAllWBs;
        }
Exemple #8
0
        public override void SaveToRow <T>(DataSheet <T> datasheet, int rowIndex)
        {
            Columns = datasheet.Columns;

            if (newTeamFound)
            {
                Columns["Path To Team"][rowIndex] = PathToTeam;
            }

            Columns["Total Open WBs"][rowIndex]   = totalOpenWBs;
            Columns["Total Closed WBs"][rowIndex] = totalClosedWBs;
            Columns["Total Work Boxes"][rowIndex] = totalWorkBoxes;

            Columns["Total Docs in Open WBs"][rowIndex]   = totalDocsInOpenWBs;
            Columns["Total Docs in Closed WBs"][rowIndex] = totalDocsInClosedWBs;
            Columns["Total Docs in All WBs"][rowIndex]    = totalDocsInAllWBs;

            Columns["Size of Docs in Open WBs"][rowIndex]   = SizeOfDocsInOpenWBs;
            Columns["Size of Docs in Closed WBs"][rowIndex] = SizeOfDocsInClosedWBs;
            Columns["Size of Docs in All WBs"][rowIndex]    = SizeOfDocsInAllWBs;
        }
Exemple #9
0
        private void calculateWBCFigures(Excel.Workbook processed)
        {
            // Now we're going to work out the figures for each WBC
            DataSheet <FiguresForWBC> wbcFigures = new DataSheet <FiguresForWBC>(processed, "WBC Figures", true);

            foreach (WorkBoxDetails workBox in AllWorkBoxes)
            {
                if (!workBox.LoadedOK)
                {
                    continue;
                }

                FiguresForWBC figuresForWBC = wbcFigures[workBox.WorkBoxCollectionURL];
                if (figuresForWBC == null)
                {
                    figuresForWBC = new FiguresForWBC(workBox.WorkBoxCollectionURL);
                    wbcFigures.Add(figuresForWBC);
                }

                figuresForWBC.Add(workBox);
            }
            wbcFigures.SaveToSheet();
        }
Exemple #10
0
        public override void ConfigureDataSheet <T>(DataSheet <T> datasheet)
        {
            datasheet.AddTextColumn("ERROR?", 23);
            datasheet.AddTextColumn("Exception Details", 14);
            datasheet.AddTextColumn("Team Name", 20);
            datasheet.AddTextColumn("Path To Team", 20);
            datasheet.AddTextColumn("Functional Area", 20);
            datasheet.AddTextColumn("Team site URL", 20);
            datasheet.AddTextColumn("Has SitePages in URL", 10);
            datasheet.AddDateColumn("Date Created");
            datasheet.AddTextColumn("Records Types List URL", 20);
            datasheet.AddIntegerColumn("Num Owners", 20);
            datasheet.AddIntegerColumn("Num Members", 20);
            datasheet.AddTextColumn("Team Manager", 20);
            datasheet.AddTextColumn("Team Owners", 20);
            datasheet.AddTextColumn("Team Members", 20);
            datasheet.AddTextColumn("Team Owners Emails", 20);
            datasheet.AddTextColumn("Team Members Emails", 20);
            datasheet.AddTextColumn("Team Owners SPGroup Name", 20);
            datasheet.AddTextColumn("Team Members SPGroup Name", 20);
            datasheet.AddTextColumn("Public Publishers SPGroup Name", 20);
            datasheet.AddTextColumn("Public Publishers", 20);
            datasheet.AddIntegerColumn("Num users this team and below", 20);
            datasheet.AddTextColumn("All emails for this team and below", 20);

            datasheet.AddIntegerColumn("Total Open WBs", 20);
            datasheet.AddIntegerColumn("Total Closed WBs", 20);
            datasheet.AddIntegerColumn("Total Work Boxes", 20);

            datasheet.AddIntegerColumn("Total Docs in Open WBs", 20);
            datasheet.AddIntegerColumn("Total Docs in Closed WBs", 20);
            datasheet.AddIntegerColumn("Total Docs in All WBs", 20);

            datasheet.AddFileSizeMBColumn("Size of Docs in Open WBs", 20);
            datasheet.AddFileSizeMBColumn("Size of Docs in Closed WBs", 20);
            datasheet.AddFileSizeMBColumn("Size of Docs in All WBs", 20);
        }
Exemple #11
0
        public override void LoadFromRow <T>(DataSheet <T> datasheet, int rowIndex)
        {
            Name        = (String)datasheet.Columns["Name"][rowIndex];
            AbsoluteURL = (String)datasheet.Columns["Absolute URL"][rowIndex];

            FunctionalArea = (String)datasheet.Columns["Functional Area"][rowIndex];
            RecordsType    = (String)datasheet.Columns["Records Type"][rowIndex];

            if (datasheet.Columns["Date Created"].HasValue(rowIndex))
            {
                hasBeenCreated = true;
                DateCreated    = (DateTime)datasheet.Columns["Date Created"][rowIndex];
            }

            if (datasheet.Columns["Date Last Modified"].HasValue(rowIndex))
            {
                hasBeenModified  = true;
                DateLastModified = (DateTime)datasheet.Columns["Date Last Modified"][rowIndex];
            }

            if (datasheet.Columns["Date Declared"].HasValue(rowIndex))
            {
                hasBeenDeclared  = true;
                DateLastModified = (DateTime)datasheet.Columns["Date Declared"][rowIndex];
            }

            if (datasheet.Columns["File Size in Bytes"].HasValue(rowIndex))
            {
                FileSize = (long)datasheet.Columns["File Size in Bytes"][rowIndex];
            }

            if (datasheet.Columns["Live?"].HasValue(rowIndex))
            {
                IsArchived = "Archived".Equals((String)datasheet.Columns["Live?"][rowIndex]);
            }
        }
Exemple #12
0
        public override void ConfigureDataSheet <T>(DataSheet <T> datasheet)
        {
            datasheet.AddTextColumn("Functional Area", 30);

            datasheet.AddIntegerColumn("Total Teams", 20);


            datasheet.AddIntegerColumn("Total Entries", 20);

            datasheet.AddIntegerColumn("Total Open WBs", 20);
            datasheet.AddIntegerColumn("Total Closed WBs", 20);
            datasheet.AddIntegerColumn("Total Work Boxes", 20);

            datasheet.AddIntegerColumn("Total Docs in Open WBs", 20);
            datasheet.AddIntegerColumn("Total Docs in Closed WBs", 20);
            datasheet.AddIntegerColumn("Total Docs in All WBs", 20);

            datasheet.AddFileSizeMBColumn("Size of Docs in Open WBs", 20);
            datasheet.AddFileSizeMBColumn("Size of Docs in Closed WBs", 20);
            datasheet.AddFileSizeMBColumn("Size of Docs in All WBs", 20);

            datasheet.AddIntegerColumn("Total Doc Records", 20);
            datasheet.AddFileSizeMBColumn("Total Doc Records Size", 20);
        }
Exemple #13
0
        public override void SaveToRow <T>(DataSheet <T> datasheet, int rowIndex)
        {
            Columns = datasheet.Columns;
            Columns["Records Type"][rowIndex] = RecordsType;

            Columns["WB Auto-Close Rule"][rowIndex] = WBAutoCloseRule;
            Columns["WB Retention Rule"][rowIndex]  = WBRetentionRule;

            Columns["Total Open WBs"][rowIndex]    = totalOpenWBs;
            Columns["Total Closed WBs"][rowIndex]  = totalClosedWBs;
            Columns["Total Deleted WBs"][rowIndex] = totalDeletedWBs;
            Columns["Total Work Boxes"][rowIndex]  = totalWorkBoxes;

            if (totalWorkBoxes > 0)
            {
                Columns["Date First Used"][rowIndex] = DateFirstUsed;
                Columns["Date Last Used"][rowIndex]  = DateLastUsed;
            }
            else
            {
                Columns["Date First Used"][rowIndex] = null;
                Columns["Date Last Used"][rowIndex]  = null;
            }

            Columns["Total Docs in Open WBs"][rowIndex]   = totalDocsInOpenWBs;
            Columns["Total Docs in Closed WBs"][rowIndex] = totalDocsInClosedWBs;
            Columns["Total Docs in All WBs"][rowIndex]    = totalDocsInAllWBs;

            Columns["Size of Docs in Open WBs"][rowIndex]   = SizeOfDocsInOpenWBs;
            Columns["Size of Docs in Closed WBs"][rowIndex] = SizeOfDocsInClosedWBs;
            Columns["Size of Docs in All WBs"][rowIndex]    = SizeOfDocsInAllWBs;


            Columns["Total Document Records"][rowIndex]    = totalDocumentRecords;
            Columns["Total Size of Doc Records"][rowIndex] = totalSizeOfDocRecords;
        }
Exemple #14
0
        public override void ConfigureDataSheet <T>(DataSheet <T> datasheet)
        {
            datasheet.AddTextColumn("ERROR?", 20);
            datasheet.AddTextColumn("Exception Details", 20);

            datasheet.AddTextColumn("Records Type Name", 20);
            datasheet.AddTextColumn("Records Type Full Path", 20);
            datasheet.AddTextColumn("Description", 20);
            datasheet.AddTextColumn("Default Functional Area", 20);
            datasheet.AddBooleanColumn("Allow Other Functional Areas");

            datasheet.AddDateColumn("Date Created");
            datasheet.AddDateColumn("Date Last Modified");

            datasheet.AddBooleanColumn("Allow Work Box Records");
            datasheet.AddTextColumn("Work Box Collection URL", 20);

            datasheet.AddTextColumn("Who Can Create New Work Boxes", 20);
            datasheet.AddTextColumn("Create New Work Box Text", 20);

            datasheet.AddTextColumn("Work Box Unique ID Prefix", 20);
            datasheet.AddTextColumn("Work Box Local ID Source", 20);
            datasheet.AddIntegerColumn("Work Box Generated Local ID Offset", 20);

            datasheet.AddTextColumn("Work Box Short Title Requirement", 20);
            datasheet.AddTextColumn("Work Box Short Title Description", 20);
            datasheet.AddTextColumn("Work Box Reference ID Requirement", 20);
            datasheet.AddTextColumn("Work Box Reference ID Description", 20);
            datasheet.AddTextColumn("Work Box Reference Date Requirement", 20);
            datasheet.AddTextColumn("Work Box Reference Date Description", 20);
            datasheet.AddTextColumn("Work Box Series Tag Requirement", 20);
            datasheet.AddTextColumn("Work Box Series Tag Description", 20);
            datasheet.AddTextColumn("Work Box Series Tag Parent Term", 20);
            datasheet.AddTextColumn("Work Box Series Tag Allow New Terms", 20);

            datasheet.AddTextColumn("Work Box Naming Convention", 20);

            datasheet.AddIntegerColumn("Auto-Close Time Scalar", 20);
            datasheet.AddTextColumn("Auto-Close Time Unit", 20);
            datasheet.AddTextColumn("Auto-Close Trigger Date", 20);

            datasheet.AddIntegerColumn("Retention Time Scalar", 20);
            datasheet.AddTextColumn("Retention Time Unit", 20);
            datasheet.AddTextColumn("Retention Trigger Date", 20);


            datasheet.AddBooleanColumn("Allow Publishing Out");
            datasheet.AddTextColumn("Minimum Publishing Out Protective Zone", 20);

            datasheet.AddTextColumn("Generate Publish Out Filenames", 20);
            datasheet.AddTextColumn("Use Defaults When Publishing Out", 20);
            datasheet.AddTextColumn("Default Publishing Out Records Type", 20);
            datasheet.AddTextColumn("Cache Details For Open Work Boxes", 20);

            datasheet.AddBooleanColumn("Allow Document Records");
            datasheet.AddTextColumn("Document Minimum Protective Zone", 20);

            datasheet.AddTextColumn("Document Reference ID Requirement", 20);
            datasheet.AddTextColumn("Document Reference ID Description", 20);
            datasheet.AddTextColumn("Document Reference Date Requirement", 20);
            datasheet.AddTextColumn("Document Reference Date Source", 20);
            datasheet.AddTextColumn("Document Reference Date Description", 20);
            datasheet.AddTextColumn("Document Series Tag Requirement", 20);
            datasheet.AddTextColumn("Document Series Tag Description", 20);
            datasheet.AddTextColumn("Document Scan Date Requirement", 20);
            datasheet.AddTextColumn("Document Scan Date Description", 20);

            datasheet.AddTextColumn("Document Naming Convention", 20);
            datasheet.AddBooleanColumn("Enforce Document Naming Convention");

            datasheet.AddTextColumn("Filing Rule Level 1", 20);
            datasheet.AddTextColumn("Filing Rule Level 2", 20);
            datasheet.AddTextColumn("Filing Rule Level 3", 20);
            datasheet.AddTextColumn("Filing Rule Level 4", 20);
        }
Exemple #15
0
 public override void SaveToRow <T>(DataSheet <T> datasheet, int rowIndex)
 {
     Columns = datasheet.Columns;
 }
Exemple #16
0
        private int calculateMonthlyFigures(String workSheetTitle, Excel.Workbook processed, bool excludeFOI, bool excludeIAS)
        {
            // Now we're going to work out the monthly figures:
            DataSheet <FiguresForOneMonth> monthlyFigures = new DataSheet <FiguresForOneMonth>(processed, workSheetTitle, true);
            DateTime monthWalker   = new DateTime(2012, 01, 01);
            DateTime continueUntil = new DateTime(2020, 01, 01);

            // First add all of the months up until today + two years.
            while (monthWalker <= continueUntil)
            {
                monthlyFigures.Add(new FiguresForOneMonth(monthWalker));
                monthWalker = monthWalker.AddMonths(1);
            }


            int failures = 0;

            // Now add all of the work boxes to each of the relevant months:
            foreach (WorkBoxDetails workBox in AllWorkBoxes)
            {
                if (!workBox.LoadedOK)
                {
                    failures++;
                    continue;
                }

                try
                {
                    if (workBox.hasBeenCreated)
                    {
                        if (excludeFOI)
                        {
                            if (workBox.WorkBoxCollectionURL.Equals("http://collection.izzi/foi"))
                            {
                                continue;
                            }
                        }
                        if (excludeIAS)
                        {
                            if (workBox.WorkBoxCollectionURL.Equals("http://hass.izzi/ias"))
                            {
                                continue;
                            }
                        }

                        monthWalker = (new DateTime(workBox.DateCreated.Year, workBox.DateCreated.Month, 1)).AddMonths(-1);

                        while (monthWalker <= continueUntil)
                        {
                            FiguresForOneMonth month = monthlyFigures[monthWalker.Date.Month + " " + monthWalker.Date.Year];

                            if (month != null)
                            {
                                month.Add(workBox);
                            }

                            monthWalker = monthWalker.AddMonths(1);
                        }
                    }
                }
                catch (Exception exception)
                {
                    failures++;
                }
            }


            foreach (TeamDetails team in AllTeams)
            {
                if (team.hasBeenCreated)
                {
                    monthWalker = (new DateTime(team.DateCreated.Year, team.DateCreated.Month, 1)).AddMonths(-1);

                    while (monthWalker < DateTime.Now)
                    {
                        FiguresForOneMonth month = monthlyFigures[monthWalker.Date.Month + " " + monthWalker.Date.Year];

                        if (month != null)
                        {
                            month.Add(team);
                        }

                        monthWalker = monthWalker.AddMonths(1);
                    }
                }
            }


            foreach (UserDetails user in AllUsers)
            {
                if (user.VisitedAnyWB)
                {
                    monthWalker = (new DateTime(user.OldestVisitDate.Year, user.OldestVisitDate.Month, 1)).AddMonths(-1);

                    while (monthWalker < DateTime.Now)
                    {
                        FiguresForOneMonth month = monthlyFigures[monthWalker.Date.Month + " " + monthWalker.Date.Year];

                        if (month != null)
                        {
                            month.Add(user);
                        }

                        monthWalker = monthWalker.AddMonths(1);
                    }
                }
            }

            foreach (RecordsDetails record in AllRecords)
            {
                if (record.hasBeenCreated)
                {
                    monthWalker = (new DateTime(record.DateCreated.Year, record.DateCreated.Month, 1)).AddMonths(-1);

                    while (monthWalker < DateTime.Now)
                    {
                        FiguresForOneMonth month = monthlyFigures[monthWalker.Date.Month + " " + monthWalker.Date.Year];

                        if (month != null)
                        {
                            month.Add(record);
                        }

                        monthWalker = monthWalker.AddMonths(1);
                    }
                }
            }

            monthlyFigures.SaveToSheet();

            return(failures);
        }
Exemple #17
0
 public virtual void SaveToRow <T>(DataSheet <T> datasheet, int rowIndex) where T : DataSheetType, new()
 {
 }
Exemple #18
0
 public virtual void LoadFromRow <T>(DataSheet <T> datasheet, int rowIndex) where T : DataSheetType, new()
 {
 }
Exemple #19
0
 public virtual void ConfigureDataSheet <T>(DataSheet <T> datasheet) where T : DataSheetType, new()
 {
     // Add the columns for DataSheets of this type - by creating an 'row' with rowIndex = 1
 }
Exemple #20
0
 public override void LoadFromRow <T>(DataSheet <T> datasheet, int rowIndex)
 {
     // Doing nothing as this is a write only sheet
     // Date = worksheet.xGetCellAsDateTime(rowIndex, "A");
 }
Exemple #21
0
        internal int ProcessWBFData(Label ProgressInformation)
        {
            Excel.Workbook processed = this.Application.Workbooks.Open("Z:\\VS2010\\WBFAnalysisTool\\Data\\WBFDataAnalysis.xlsx", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);


            ProgressInformation.Text = "Opened the work book";

            AllRecordsTypes = new DataSheet <RecordsTypesDetails>(processed, "Records Types Details", false);

            ProgressInformation.Text = "Loaded all records types";

            AllTeams = new DataSheet <TeamDetails>(processed, "Team Details", false);

            ProgressInformation.Text = "Loaded all teams";

            AllUsers = new DataSheet <UserDetails>(processed, "User Details", false);

            ProgressInformation.Text = "Loaded all users";

            AllWorkBoxes = new DataSheet <WorkBoxDetails>(processed, "Work Box Details", false);
            // This will just save the load error flags:
            AllWorkBoxes.SaveToSheet();

            ProgressInformation.Text = "Loaded all work boxes";

            AllRecords = new DataSheet <RecordsDetails>(processed, "Records Details", false);

            ProgressInformation.Text = "Loaded all records";

            // Now adding the WBs the belong to each team:
            calculateTeamFigures(processed);

            ProgressInformation.Text = "Calculated team figures";

            calculateWBCFigures(processed);

            ProgressInformation.Text = "Calculated WBC figures";


            int failures = calculateMonthlyFigures("Monthly Figures", processed, true, true);

            ProgressInformation.Text = "Calculated monthly figures";

            calculateMonthlyFigures("Monthly Figures w FOI", processed, false, true);

            ProgressInformation.Text = "Calculated monthly figures w FOI";

            calculateMonthlyFigures("Monthly Figures w FOI w IAS", processed, false, false);

            ProgressInformation.Text = "Calculated monthly figures w FOI w IAS";

            calculateUsedRecordsTypesFigures(processed);

            ProgressInformation.Text = "Calculated records types";

            calculateFunctionalAreasFigures(processed);

            ProgressInformation.Text = "Calculated functional areas";

            return(failures);
        }
Exemple #22
0
        public override void SaveToRow <T>(DataSheet <T> datasheet, int rowIndex)
        {
            Columns = datasheet.Columns;

            Columns["Date."][rowIndex]            = Date;
            Columns["Total WB Deleted"][rowIndex] = totalDeleted;
            Columns["Num WB To Delete"][rowIndex] = totalToDelete;

            Columns["Total Docs in WB To Delete"][rowIndex]         = totalDocsInWBToDelete;
            Columns["Total Size of Docs in WB To Delete"][rowIndex] = totalSizeOfDocsInWBToDelete;


            // We'll only output the rest for the historical dates up until now.
            if (Date > DateTime.Now)
            {
                return;
            }

            Columns["Actually Deleted"][rowIndex] = numWBInDeletedState;


            Columns["Date"][rowIndex]        = Date;
            Columns["Num Created"][rowIndex] = numWBCreated;
            Columns["Num Opened"][rowIndex]  = numWBOpened;
            Columns["Num Closed"][rowIndex]  = numWBClosed;
            Columns["Num Deleted"][rowIndex] = numWBDeleted;

            Columns["Last Modified"][rowIndex] = numWBLastModified;
            Columns["Last Visited"][rowIndex]  = numWBLastVisited;

            Columns["Date ."][rowIndex]                = Date;
            Columns["In Created State"][rowIndex]      = numWBInCreatedState;
            Columns["In Open State"][rowIndex]         = numWBInOpenState;
            Columns["In Closed State"][rowIndex]       = numWBInClosedState;
            Columns["In Deleted State"][rowIndex]      = numWBInDeletedState;
            Columns["Open Multi Teams WBs"][rowIndex]  = openMultiTeamsWBs;
            Columns["Total Multi Teams WBs"][rowIndex] = totalMultiTeamsWBs;
            Columns["Total Work Boxes"][rowIndex]      = numberOfWorkBoxes;

            Columns["Date  ."][rowIndex] = Date;
            Columns["Total Docs in Open WBs"][rowIndex]   = numDocsInOpenWBs;
            Columns["Total Docs in Closed WBs"][rowIndex] = numDocsInClosedWBs;
            Columns["Total Docs in All WBs"][rowIndex]    = totalNumDocsInWBs;

            Columns["Date   ."][rowIndex] = Date;
            Columns["Size of Docs in Open WBs"][rowIndex]   = sizeOfDocsInOpenWBs;
            Columns["Size of Docs in Closed WBs"][rowIndex] = sizeOfDocsInClosedWBs;
            Columns["Size of Docs in All WBs"][rowIndex]    = totalSizeOfDocsInWBs;


            Columns["Date    ."][rowIndex]            = Date;
            Columns["Teams Created"][rowIndex]        = numTeamsCreated;
            Columns["Total Teams"][rowIndex]          = numTotalTeams;
            Columns["Teams Owning"][rowIndex]         = owningTeams.Count;
            Columns["Teams Involved"][rowIndex]       = involvedTeams.Count;
            Columns["Teams Visiting"][rowIndex]       = visitingTeams.Count;
            Columns["Individuals Involved"][rowIndex] = involvedIndividuals.Count;
            Columns["Individuals Visiting"][rowIndex] = visitingIndividuals.Count;

            Columns["Users Last Visited WB"][rowIndex] = lastVistedWBThisMonth;
            Columns["Users Ever Visited WB"][rowIndex] = visitedWBEver;


            Columns["Total Doc Records Created"][rowIndex]   = totalDocRecordsCreated;
            Columns["Public Doc Records Created"][rowIndex]  = publicDocRecordsCreated;
            Columns["Public Doc Records Archived"][rowIndex] = publicDocRecordsArchived;

            Columns["Total Ever Doc Records"][rowIndex]             = totalEverDocRecords;
            Columns["Total Ever Public Records"][rowIndex]          = totalEverPublicRecords;
            Columns["Total Ever Archived Public Records"][rowIndex] = totalEverArchivedPublicRecords;

            Columns["Size Of All Doc Records"][rowIndex]                 = sizeOfAllDocRecords;
            Columns["Size Of All Live Public Doc Records"][rowIndex]     = sizeOfAllLivePublicDocRecords;
            Columns["Size Of All Archived Public Doc Records"][rowIndex] = sizeOfAllArchivedPublicDocRecords;
        }
Exemple #23
0
        public override void ConfigureDataSheet <T>(DataSheet <T> datasheet)
        {
            // Nothing to be done here as configuration should be done by the ConfigureWithCategories for the DataSheet using this DataSheetType
            //throw new NotSupportedException("This method should never get called on the FiguresForOneDay class.");

            datasheet.AddDateColumn();

            datasheet.AddIntegerColumn("Num Created", 20);
            datasheet.AddIntegerColumn("Num Opened", 20);
            datasheet.AddIntegerColumn("Num Closed", 20);
            datasheet.AddIntegerColumn("Num Deleted", 20);

            datasheet.AddIntegerColumn("Last Modified", 20);
            datasheet.AddIntegerColumn("Last Visited", 20);

            datasheet.AddTextColumn(".", 5);
            datasheet.AddDateColumn("Date.");
            datasheet.AddIntegerColumn("Total WB Deleted", 20);
            datasheet.AddIntegerColumn("Num WB To Delete", 20);
            datasheet.AddIntegerColumn("Actually Deleted", 20);
            datasheet.AddIntegerColumn("Total Docs in WB To Delete", 20);
            datasheet.AddFileSizeGBColumn("Total Size of Docs in WB To Delete", 20);


            datasheet.AddTextColumn(" .", 5);
            datasheet.AddDateColumn("Date .");

            datasheet.AddIntegerColumn("In Created State", 20);
            datasheet.AddIntegerColumn("In Open State", 20);
            datasheet.AddIntegerColumn("In Closed State", 20);
            datasheet.AddIntegerColumn("In Deleted State", 20);
            datasheet.AddIntegerColumn("Open Multi Teams WBs", 20);
            datasheet.AddIntegerColumn("Total Multi Teams WBs", 20);
            datasheet.AddIntegerColumn("Total Work Boxes", 20);

            datasheet.AddTextColumn("  .", 5);
            datasheet.AddDateColumn("Date  .");

            datasheet.AddIntegerColumn("Total Docs in Open WBs", 20);
            datasheet.AddIntegerColumn("Total Docs in Closed WBs", 20);
            datasheet.AddIntegerColumn("Total Docs in All WBs", 20);

            datasheet.AddTextColumn("   .", 5);
            datasheet.AddDateColumn("Date   .");

            datasheet.AddFileSizeGBColumn("Size of Docs in Open WBs", 20);
            datasheet.AddFileSizeGBColumn("Size of Docs in Closed WBs", 20);
            datasheet.AddFileSizeGBColumn("Size of Docs in All WBs", 20);


            datasheet.AddTextColumn("    .", 5);
            datasheet.AddDateColumn("Date    .");

            datasheet.AddIntegerColumn("Teams Created", 20);
            datasheet.AddIntegerColumn("Total Teams", 20);
            datasheet.AddIntegerColumn("Teams Owning", 20);
            datasheet.AddIntegerColumn("Teams Involved", 20);
            datasheet.AddIntegerColumn("Teams Visiting", 20);
            datasheet.AddIntegerColumn("Individuals Involved", 20);
            datasheet.AddIntegerColumn("Individuals Visiting", 20);
            datasheet.AddIntegerColumn("Users Last Visited WB", 20);
            datasheet.AddIntegerColumn("Users Ever Visited WB", 20);


            datasheet.AddTextColumn("     .", 5);
            datasheet.AddDateColumn("Date     .");

            datasheet.AddIntegerColumn("Total Doc Records Created", 20);
            datasheet.AddIntegerColumn("Public Doc Records Created", 20);
            datasheet.AddIntegerColumn("Public Doc Records Archived", 20);

            datasheet.AddIntegerColumn("Total Ever Doc Records", 20);
            datasheet.AddIntegerColumn("Total Ever Public Records", 20);
            datasheet.AddIntegerColumn("Total Ever Archived Public Records", 20);

            datasheet.AddFileSizeGBColumn("Size Of All Doc Records", 20);
            datasheet.AddFileSizeGBColumn("Size Of All Live Public Doc Records", 20);
            datasheet.AddFileSizeGBColumn("Size Of All Archived Public Doc Records", 20);
        }
Exemple #24
0
 public override void SaveToRow <T>(DataSheet <T> datasheet, int rowIndex)
 {
 }
Exemple #25
0
        public override void LoadFromRow <T>(DataSheet <T> datasheet, int rowIndex)
        {
            Error                = (String)datasheet.Columns["ERROR?"][rowIndex];
            ExceptionDetails     = (String)datasheet.Columns["Exception Details"][rowIndex];
            WorkBoxCollectionURL = (String)datasheet.Columns["WBC URL"][rowIndex];

            ListItemID = (String)datasheet.Columns["ID"][rowIndex];
            WorkBoxURL = (String)datasheet.Columns["WorkBoxURL"][rowIndex];

            Status = (String)datasheet.Columns["Status"][rowIndex];

            FunctionalArea = (String)datasheet.Columns["Functional Area"][rowIndex];
            RecordsType    = (String)datasheet.Columns["Records Type"][rowIndex];

            if (datasheet.Columns["Created"].HasValue(rowIndex))
            {
                hasBeenCreated = true;
                DateCreated    = (DateTime)datasheet.Columns["Created"][rowIndex];
            }

            if (datasheet.Columns["Opened"].HasValue(rowIndex))
            {
                hasBeenOpened = true;
                DateOpened    = (DateTime)datasheet.Columns["Opened"][rowIndex];
            }

            if (datasheet.Columns["Closed"].HasValue(rowIndex))
            {
                hasBeenClosed = true;
                DateClosed    = (DateTime)datasheet.Columns["Closed"][rowIndex];
            }

            if (datasheet.Columns["Deleted"].HasValue(rowIndex))
            {
                hasBeenDeleted = true;
                DateDeleted    = (DateTime)datasheet.Columns["Deleted"][rowIndex];
            }

            if (datasheet.Columns["Retention End Date"].HasValue(rowIndex))
            {
                willBeDeleted   = true;
                DateToBeDeleted = (DateTime)datasheet.Columns["Retention End Date"][rowIndex];

                if (KeyRetentionPeriods.ContainsKey(RecordsType))
                {
                    if (hasBeenClosed && DateToBeDeleted > DateTime.Now.AddYears(100))
                    {
                        DateToBeDeleted    = DateClosed.AddYears(KeyRetentionPeriods[RecordsType]);
                        willBeDeleted      = true;
                        projectedRetention = true;
                    }
                }
            }
            else
            {
                if (KeyRetentionPeriods.ContainsKey(RecordsType))
                {
                    if (hasBeenClosed)
                    {
                        DateToBeDeleted    = DateClosed.AddYears(KeyRetentionPeriods[RecordsType]);
                        willBeDeleted      = true;
                        projectedRetention = true;
                    }
                }
            }

            if (datasheet.Columns["Modified (approx)"].HasValue(rowIndex))
            {
                hasBeenModified  = true;
                DateLastModified = (DateTime)datasheet.Columns["Modified (approx)"][rowIndex];
            }

            if (datasheet.Columns["Visited (approx)"].HasValue(rowIndex))
            {
                hasBeenVisited  = true;
                DateLastVisited = (DateTime)datasheet.Columns["Visited (approx)"][rowIndex];
            }


            OwningTeam          = (String)datasheet.Columns["Owning Team"][rowIndex];
            InvolvedTeams       = (String)datasheet.Columns["Involved Teams"][rowIndex];
            VisitingTeams       = (String)datasheet.Columns["Visiting Teams"][rowIndex];
            InvolvedIndividuals = (String)datasheet.Columns["Involved Individuals"][rowIndex];
            VisitingIndividuals = (String)datasheet.Columns["Visiting Individuals"][rowIndex];

            if (datasheet.Columns["Found Documents"].HasValue(rowIndex))
            {
                FoundDocuments = true.ToString().Equals((String)datasheet.Columns["Found Documents"][rowIndex]);
                if (FoundDocuments)
                {
                    NumDocuments     = (int)datasheet.Columns["Num Documents"][rowIndex];
                    TotalSizeOfFiles = (long)datasheet.Columns["Total Size of Docs"][rowIndex];
                }
            }
        }