Example #1
0
        private void findDrawnNumbers()
        {
            for (int i = 0; i < 10; i++)
            {
                this.drawnNumbers[i] = false;
            }

            ExcelSheet sheet   = this.file.getSheet(1);
            int        lastRow = sheet.getLastUsedRowNumber();

            while (lastRow > 1)
            {
                for (int i = 0; i < 10; i++)
                {
                    if (!this.numberHasBeenDrawn(i))
                    {
                        if (!sheet.getCellText(lastRow, i + 4).Equals(""))
                        {
                            this.drawnNumbers[i] = true;
                        }
                    }
                }
                lastRow--;
            }
        }
Example #2
0
        private void addNonWinningEntry(int lastRow, int column, int newRow, ExcelSheet sheet)
        {
            string days = sheet.getCellText(lastRow, column);

            if (days.Equals("SALIO"))
            {
                sheet.setCellText(newRow, column, "1 DIA");
                this.colorizeCellAccordingToDaysPassed(newRow, column, 1, sheet);
            }
            else if (days.Equals("1 DIA"))
            {
                sheet.setCellText(newRow, column, "2 DIAS");
                this.colorizeCellAccordingToDaysPassed(newRow, column, 2, sheet);
            }
            else
            {
                days = days.Replace(" DIAS", "");
                int numberOfDays = Int32.Parse(days);
                numberOfDays++;

                this.colorizeCellAccordingToDaysPassed(newRow, column, numberOfDays, sheet);
                days = numberOfDays.ToString() + " DIAS";
                sheet.setCellText(newRow, column, days);
            }
        }
Example #3
0
 private bool isRowAnEmptyEntry(ExcelSheet sheet, int row)
 {
     return((sheet.getCellText(row, 3).Equals("")) || (sheet.getCellText(row, 3).Equals("DOMINGO")));
 }