Пример #1
0
        public static ContentService.FileAtts createFileAtts(Record record, int length)
        {
            ContentService.FileAtts fileAtts = new ContentService.FileAtts();
            fileAtts.CreatedDate = DateTime.Now;
            fileAtts.FileName = Utils.replaceFileExtension(record.fileName, ".pdf");
            fileAtts.FileSize = length;
            fileAtts.ModifiedDate = DateTime.Now;

            return fileAtts;
        }
Пример #2
0
 public void setRecord(Record record)
 {
     this.record = record;
 }
Пример #3
0
        public JobDocument[] processTicket(XmlTicket t, Record r, string workFlowName)
        {
            try
            {
                XmlResult xmlResult = clientObject.ProcessTicket(this.location, workFlowName, t);

                if (xmlResult.IsFailed)
                {
                    log.Error("Recognition failed for object: '{0}', version: '{1}', work type id: '{1}'.", new object[] { r.objectId, r.versionNum, r.workTypeId });
                    return null;
                }
                else
                {
                    log.Info("Recognition succeed for object: '{0}', version: '{1}', work type id: '{1}'.", new object[] { r.objectId, r.versionNum, r.workTypeId });
                    return xmlResult.JobDocuments;
                }
            }
            catch (Exception e)
            {
                log.Error(e, "Exception in method 'processTicket' while trying to recognize object: '{0}', version: '{1}', using work type with id: '{1}'.", new object[] { r.objectId, r.versionNum, r.workTypeId });
                return null;
            }
        }