예제 #1
0
        private void pastePins()
        {
            for (int i = teethNumber + 1; i < teethNumber + 1 + pinNumber; i = i + 3)
            {
                ToothSelectionExcel table = new PinSelectionExcel();
                table.addRowTooth("Blank", 18);

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

                ExcelReport.addToothSelection(table);
            }

            for (int i = 1; i <= (pinNumber + 2) / 3; i = i + 1)
            {
                int startIndex = ExcelReport.teethSelectionsExcel[teethNumber + i - 1].getStartIndex();

                ToothDetails details = toothDetails[teethNumber + 3 * (i - 1) + 1];
                ExcelReport.xlWorkSheet.Cells[startIndex + 9, 8]  = details.pinToothNumber;
                ExcelReport.xlWorkSheet.Cells[startIndex + 10, 8] = details.pinSizeDL;

                details = toothDetails[teethNumber + 3 * (i - 1) + 2];
                ExcelReport.xlWorkSheet.Cells[startIndex + 9, 12]  = details.pinToothNumber;
                ExcelReport.xlWorkSheet.Cells[startIndex + 10, 12] = details.pinSizeDL;

                details = toothDetails[teethNumber + 3 * (i - 1) + 3];
                ExcelReport.xlWorkSheet.Cells[startIndex + 9, 16]  = details.pinToothNumber;
                ExcelReport.xlWorkSheet.Cells[startIndex + 10, 16] = details.pinSizeDL;

                try
                {
                    pasteImageInCell(images[teethNumber + 3 * (i - 1) + 1][0], startIndex + 1, 6);
                }
                catch (System.ArgumentOutOfRangeException e)
                {
                }
                try
                {
                    pasteImageInCell(images[teethNumber + 3 * (i - 1) + 2][0], startIndex + 1, 10);
                }
                catch (System.ArgumentOutOfRangeException e)
                {
                }
                try
                {
                    pasteImageInCell(images[teethNumber + 3 * (i - 1) + 3][0], startIndex + 1, 14);
                }
                catch (System.ArgumentOutOfRangeException e)
                {
                }
            }
        }
예제 #2
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);
            }
        }
예제 #3
0
        public PacientData()
        {
            #region initialize String Data ()
            orderNo    = "";
            patient    = "";
            clinic     = "";
            dentist    = "";
            opSite     = "";
            opDate     = "";
            opOption   = "";
            putty      = "";
            txOption   = "";
            anchor     = "";
            r2Stent1   = "";
            r2Stent2   = "[Qty]";
            r2Stent3   = "";
            custom1    = "";
            custom2    = "[Qty]";
            custom3    = "";
            temp1      = "";
            temp2      = "[Qty]";
            temp3      = "";
            salesRep   = "";
            operatorPC = "";
            designerPC = "";

            hasPutty            = false;
            hasNarrow           = false;
            hasRegularWide      = false;
            hasBoneProfiler     = false;
            hasNarrowCrestDrill = false;
            hasAnchorStent      = false;
            hasMUA00            = false;
            hasMUA17            = false;
            hasMUA26            = false;

            #endregion
            images       = new List <List <Image> >();
            hasPins      = false;
            toothDetails = new ToothDetails[100];
            for (int i = 0; i < toothDetails.Length; i++)
            {
                toothDetails[i] = new ToothDetails();
            }
            currentTooth = new ToothDetails();
        }