Beispiel #1
0
        public bool InsertFileData(int cpeEntryId, int cpeDefinitionId, string filePath)
        {
            bool success;

            if (File.Exists(filePath))
            {
                OCR         ocr         = new OCR();
                var         json        = ocr.GetJSON(filePath);
                string      ocrText     = ocr.GetProperty(json);
                ExtractData extractData = new ExtractData();
                extractData.OCRText = ocrText;
                switch (cpeDefinitionId)
                {
                case 27:
                    success = extractData.Glue_Turret_Data(cpeEntryId, cpeDefinitionId);
                    break;

                default:
                    success = false;     //if wrong definitionId is given
                    break;
                }
                return(success);
            }
            else
            {
                success = false; //if file is not found
                return(success);
            }
        }