コード例 #1
0
 public override void changeColorRow(RowInTM rowItem, Color color)
 {
     foreach (Item item in rowItem)
     {
         changeColorCell(item, color);
     }
 }
コード例 #2
0
        public override List <Bulletin> loadExcel(string TM)
        {
            openExcel(TM);
            List <Bulletin> TMResult    = new List <Bulletin>();
            List <RowInTM>  rowItems    = new List <RowInTM>();
            int             row         = 2;
            Item            index       = new Item();
            Item            bulletin    = new Item();
            Item            CVE         = new Item();
            Item            description = new Item();
            Item            globalKb    = new Item();
            RowInTM         rowItem;

            //string value = sheet.Cells[row, cd["cve"]].Text;

            while ((!(sheet.Cells[row, cd["kb"]].Text).Equals("")) || (!(sheet.Cells[row, cd["platform"]].Text).Equals("")) || (!(sheet.Cells[row, cd["component"]].Text).Equals("")))
            {
                if (row == 2) //This is the first time in the loop
                {
                    index       = new Item(sheet.Cells[row, cd["index"]].Text, row, cd["index"]);
                    bulletin    = new Item(sheet.Cells[row, cd["bulletin"]].Text, row, cd["bulletin"]);
                    CVE         = new Item(sheet.Cells[row, cd["cve"]].Text, row, cd["cve"]);
                    description = new Item(sheet.Cells[row, cd["description"]].Text, row, cd["description"]);
                    globalKb    = new Item(sheet.Cells[row, cd["globalKb"]].Text, row, cd["globalKb"]);
                }

                if ((!sheet.Cells[row, cd["cve"]].Text.Equals("")) && (row != 2))  // are we in a NEW BULLETIN?
                {
                    TMResult.Add(new Bulletin(index, bulletin, CVE, description, globalKb, new List <RowInTM>(rowItems)));
                    rowItems    = new List <RowInTM>();
                    index       = new Item(sheet.Cells[row, cd["index"]].Text, row, cd["index"]);
                    bulletin    = new Item(sheet.Cells[row, cd["bulletin"]].Text, row, cd["bulletin"]);
                    CVE         = new Item(sheet.Cells[row, cd["cve"]].Text, row, cd["cve"]);
                    description = new Item(sheet.Cells[row, cd["description"]].Text, row, cd["description"]);
                    globalKb    = new Item(sheet.Cells[row, cd["globalKb"]].Text, row, cd["globalKb"]);
                }

                rowItem           = new RowInTM();
                rowItem.KB        = new Item(sheet.Cells[row, cd["kb"]].Text, row, cd["kb"]);
                rowItem.platform  = new Item(sheet.Cells[row, cd["platform"]].Text, row, cd["platform"]);
                rowItem.component = new Item(sheet.Cells[row, cd["component"]].Text, row, cd["component"]);

                /*rowItem.status     = new Item(sheet.Cells[row, cd["status"]].Text, row, cd["status"]);
                 * rowItem.replacedBy = new Item(sheet.Cells[row, cd["bulletinsRep"]].Text, row, cd["bulletinsRep"]);*/
                rowItems.Add(rowItem);

                row++;
            }

            TMResult.Add(new Bulletin(index, bulletin, CVE, description, globalKb, new List <RowInTM>(rowItems)));  //The last bulletin needs to be added
            closeExcel(TM);
            return(TMResult);
        }
コード例 #3
0
        public override void verifyEquality(RowInTM rowItemDoc, RowInTM rowItemWeb)
        {
            if (!rowItemDoc.status.value.Trim().ToUpper().Equals(rowItemWeb.status.value.Trim().ToUpper()))
            {
                changeColorCell(rowItemWeb.status, different);
            }

            if (!rowItemDoc.replacedBy.value.Trim().ToUpper().Equals(rowItemWeb.replacedBy.value.Trim().ToUpper()))
            {
                changeColorCell(rowItemWeb.replacedBy, different);
            }
        }
コード例 #4
0
 public virtual void changeColorRow(RowInTM rowItem, Color color)
 {
 }
コード例 #5
0
 public virtual void verifyEquality(RowInTM rowItemDoc, RowInTM rowItemWeb)
 {
 }