예제 #1
0
/*WE NEED TO TEST
 * WE NEED TO SAVE THE CONTENT OF A BULLETIN, FROM THE OLD AND THE NEW, SO WE COULD COMPARE THEM
 * WE NEED TO RELEASE THE EXEL SHEET IF A PROBLEM OCCURS*/

        //When the table has 4 columns, it could contain platform or components, that is the reason we have sysorComponent value
        public void processRowFourCols(Novacode.Row rowContent)
        {
            string content, bulletinsRep;

            if (rowContent.Cells.Count == 4)  //there are some cases in which the tool finds a cell in the middle that has a comment and NOT actual data
            {
                scap.writePlatformOrComponentAndKB(rowContent.Cells[0].Paragraphs[0].Text, rowContent.Cells[3].Paragraphs[0].Text);
                scap.sheet.Cells[scap.getRow(), scap.getCdAt("risk")] = rowContent.Cells[2].Paragraphs[0].Text;
                content      = scap.utilities.getTextFromCell(rowContent.Cells[0].Paragraphs);
                bulletinsRep = scap.utilities.getTextFromCell(rowContent.Cells[3].Paragraphs);
                if (scap.myTable.isSystem())
                {
                    scap.writeSystem(content, bulletinsRep); // we are doing this because there maybe more than one componenet
                }
                else
                {
                    scap.writeComponent(content, bulletinsRep);
                }
            }

            if (rowContent.Cells.Count == 1)
            {
                content = rowContent.Cells[0].Paragraphs[0].Text;
                scap.myTable.setSupportedHeader(content);
                //myTable.setSystemOrComponent(content);
            }
        }
예제 #2
0
        //When the table has 4 columns, it could contain platform or components, that is the reason we have sysorComponent value
        public void processRowFourCols(HtmlNodeCollection rowContent)
        {
            string content, bulletinsRep;

            scap.writePlatformOrComponentAndKB(rowContent[0].InnerText, rowContent[3].InnerText);
            scap.sheet.Cells[scap.getRow(), scap.getCdAt("risk")] = rowContent[2].InnerText;
            content      = rowContent[0].InnerText;
            bulletinsRep = rowContent[3].InnerText;
            if (scap.myTable.isSystem())
            {
                scap.writeSystem(content, bulletinsRep); // we are doing this because there maybe more than one componenet
            }
            else
            {
                scap.writeComponent(content, bulletinsRep);
            }
        }