Example #1
0
        private void pasteTeeth()
        {
            for (int i = 1; i <= teethNumber; i++)
            {
                ToothSelectionExcel table = new ToothSelectionExcel();
                #region hasBoneProfiler, hasNarrowCrestDrill etc. table.addRowTooth("Name",15.25)
                if (toothDetails[i].hasBoneProfiler)
                {
                    table.addRowTooth("Bone Profiler", 15);
                }
                if (toothDetails[i].hasNarrowCrestDrill)
                {
                    table.addRowTooth("Narrow Crest Drill", 15);
                }
                if (toothDetails[i].hasAnchorStent)
                {
                    table.addRowTooth("Anchor Stent", 15);
                }
                if (toothDetails[i].hasMUA)
                {
                    table.addRowTooth("MUA", 15, i);
                }
                #endregion
                table.addRowTooth("Blank", 18);


                currentHeightSum += table.getTotalHeight();
                if (currentHeightSum > maximHeight)
                {
                    excelRowBreak.Add(currentExcelBreakIndex);
                    currentHeightSum = table.getTotalHeight();
                }
                currentExcelBreakIndex = table.getEndIndex();

                ExcelReport.teethSelectionsExcel.Add(table);
            }

            for (int i = 0; i < ExcelReport.teethSelectionsExcel.Count(); i++)
            {
                ToothDetails details    = toothDetails[i + 1];
                int          startIndex = ExcelReport.teethSelectionsExcel[i].getStartIndex();
                #region //tooth details[rows,columns]
                ExcelReport.xlWorkSheet.Cells[startIndex + 1, 2] = details.toothNotation;
                ExcelReport.xlWorkSheet.Cells[startIndex + 3, 2] = details.implantSystem;
                ExcelReport.xlWorkSheet.Cells[startIndex + 5, 4] = details.sizeDL1;
                ExcelReport.xlWorkSheet.Cells[startIndex + 5, 5] = details.sizeDL2;
                ExcelReport.xlWorkSheet.Cells[startIndex + 8, 4] = details.boneDensity;
                ExcelReport.xlWorkSheet.Cells[startIndex + 9, 4] = details.gbr;
                List <Image> groupImages = this.images[i + 1];
                #endregion
                //toothImages
                pasteImageInCell(groupImages[0], startIndex + 1, 6);
                pasteImageInCell(groupImages[1], startIndex + 1, 10);
                pasteImageInCell(groupImages[2], startIndex + 1, 14);
            }
        }
 public static void addToothSelection(ToothSelectionExcel newTooth)
 {
     ExcelReport.teethSelectionsExcel.Add(newTooth);
     //ExcelReport.nextExcelRowIndex += newTooth.getRowsNumber();
 }