Exemple #1
0
 static internal SignableDocumentDTO Map(SignableDocument document)
 {
     return(new SignableDocumentDTO {
         uid = document.UID,
         type = document.DocumentType,
         documentNo = document.DocumentNo,
         description = document.Description,
         uri = document.Uri
     });
 }
        static internal void WriteDocument(SignableDocument o)
        {
            var op = DataOperation.Parse("writeEOPSignableDocument", o.Id, o.UID,
                                         o.DocumentType, o.TransactionNo, o.DocumentNo,
                                         o.Description, o.RequestedBy, o.RequestedTime,
                                         o.SignInputData, o.ExtensionData.ToString(),
                                         o.Keywords, o.PostingTime, o.PostedBy.Id, (char)o.Status,
                                         o.Integrity.GetUpdatedHashCode());

            DataWriter.Execute(op);
        }
Exemple #3
0
        static internal SignRequestDTO Map(SignRequest request)
        {
            SignableDocument document = request.Document;

            return(new SignRequestDTO {
                uid = request.UID,
                requestedBy = request.RequestedBy.Alias,
                requestedTime = request.RequestedTime,
                signStatus = request.SignStatus.ToString(),
                signatureKind = request.SignatureKind,
                digitalSignature = request.DigitalSign,

                document = Map(document),

                filing = new SignRequestFilingDTO {
                    filingNo = document.TransactionNo,
                    filingTime = document.RequestedTime,
                    filedBy = document.RequestedBy,
                    postedBy = document.PostedBy.Alias,
                },
            });
        }
Exemple #4
0
        static public SignRequestDTO PostDocument(DocumentPostDTO document)
        {
            // EnsureValidDocumentPostDTO(document);

            SignableDocument signableDocument;

            if (document.uid.Length != 0)
            {
                signableDocument = SignableDocument.Parse(document.uid);
            }
            else
            {
                signableDocument = new SignableDocument(document);
            }
            signableDocument.Save();

            var signRequest = new SignRequest(signableDocument);

            signRequest.Update(document);

            signRequest.Save();

            return(ESignMapper.Map(signRequest));
        }
 internal SignRequest(SignableDocument document)
 {
     this.Document = document;
 }