Esempio n. 1
0
        public async Task <ActionResult <EvaluationSheet> > PostEvaluationSheet(EvaluationSheet evaluationSheet)
        {
            _context.EvaluationSheet.Add(evaluationSheet);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetEvaluationSheet", new { id = evaluationSheet.Id }, evaluationSheet));
        }
Esempio n. 2
0
        public async Task <IActionResult> PutEvaluationSheet(int id, EvaluationSheet evaluationSheet)
        {
            if (id != evaluationSheet.Id)
            {
                return(BadRequest());
            }

            _context.Entry(evaluationSheet).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!EvaluationSheetExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        /**
         * Used by the lazy ref evals whenever they need To Get the value of a contained cell.
         */
        /* package */
        public ValueEval EvaluateReference(EvaluationSheet sheet, int sheetIndex, int rowIndex,
                                           int columnIndex, EvaluationTracker tracker)
        {
            EvaluationCell cell = sheet.GetCell(rowIndex, columnIndex);

            return(EvaluateAny(cell, sheetIndex, rowIndex, columnIndex, tracker));
        }
Esempio n. 4
0
 public SheetRefEvaluator(WorkbookEvaluator bookEvaluator, EvaluationTracker tracker,
         EvaluationWorkbook _workbook, int sheetIndex)
 {
     _bookEvaluator = bookEvaluator;
     _tracker = tracker;
     _sheet = _workbook.GetSheet(sheetIndex);
     _sheetIndex = sheetIndex;
 }
        public int GetSheetIndex(EvaluationSheet sheet)
        {
            object result = _sheetIndexesBySheet[sheet];

            if (result == null)
            {
                int sheetIndex = _workbook.GetSheetIndex(sheet);
                if (sheetIndex < 0)
                {
                    throw new Exception("Specified sheet from a different book");
                }
                result = sheetIndex;
                _sheetIndexesBySheet[sheet] = result;
            }
            return((int)result);
        }
 public int GetSheetIndex(EvaluationSheet evalSheet)
 {
     HSSFSheet sheet = ((HSSFEvaluationSheet)evalSheet).HSSFSheet;
     return _uBook.GetSheetIndex(sheet);
 }
        /**
         * Used by the lazy ref evals whenever they need To Get the value of a contained cell.
         */
        /* package */
        public ValueEval EvaluateReference(EvaluationSheet sheet, int sheetIndex, int rowIndex,
            int columnIndex, EvaluationTracker tracker)
        {

            EvaluationCell cell = sheet.GetCell(rowIndex, columnIndex);
            return EvaluateAny(cell, sheetIndex, rowIndex, columnIndex, tracker);
        }
 public int GetSheetIndex(EvaluationSheet sheet)
 {
     object result = _sheetIndexesBySheet[sheet];
     if (result == null)
     {
         int sheetIndex = _workbook.GetSheetIndex(sheet);
         if (sheetIndex < 0)
         {
             throw new Exception("Specified sheet from a different book");
         }
         result = sheetIndex;
         _sheetIndexesBySheet[sheet]= result;
     }
     return (int)result;
 }
Esempio n. 9
0
 public HSSFEvaluationCell(NPOI.SS.UserModel.Cell cell)
 {
     _cell = cell;
     _evalSheet = new HSSFEvaluationSheet((HSSFSheet)cell.Sheet);
 }
Esempio n. 10
0
 public HSSFEvaluationCell(NPOI.SS.UserModel.Cell cell, EvaluationSheet evalSheet)
 {
     _cell = cell;
     _evalSheet = evalSheet;
 }
Esempio n. 11
0
 public HSSFEvaluationCell(NPOI.SS.UserModel.Cell cell)
 {
     _cell      = cell;
     _evalSheet = new HSSFEvaluationSheet((HSSFSheet)cell.Sheet);
 }
Esempio n. 12
0
 public HSSFEvaluationCell(NPOI.SS.UserModel.Cell cell, EvaluationSheet evalSheet)
 {
     _cell      = cell;
     _evalSheet = evalSheet;
 }
Esempio n. 13
0
        public int GetSheetIndex(EvaluationSheet evalSheet)
        {
            HSSFSheet sheet = ((HSSFEvaluationSheet)evalSheet).HSSFSheet;

            return(_uBook.GetSheetIndex(sheet));
        }