static internal void WriteSignRequest(SignRequest o)
        {
            var op = DataOperation.Parse("writeEOPSignRequest", o.Id, o.UID,
                                         o.RequestedBy.Id, o.RequestedTime, o.RequestedTo.Id,
                                         o.Document.Id, o.SignatureKind, o.ExtensionData.ToString(),
                                         (char)o.SignStatus, o.SignTime, o.DigitalSign,
                                         o.Integrity.GetUpdatedHashCode());

            DataWriter.Execute(op);
        }
Example #2
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,
                },
            });
        }
        static private SignEvent CreateSignEvent(SignTask signTask, SignRequest signRequest)
        {
            switch (signTask.EventType)
            {
            case SignEventType.Signed:
                string digitalSign = SignData(signTask.SignCredentials,
                                              signRequest.Document.SignInputData);

                return(signRequest.Sign(digitalSign));

            case SignEventType.Refused:
                return(signRequest.Refuse());

            case SignEventType.Revoked:
                return(signRequest.Revoke());

            case SignEventType.Unrefused:
                return(signRequest.Unrefuse());

            default:
                throw Assertion.AssertNoReachThisCode();
            }
        }
Example #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));
        }
Example #5
0
        static public SignRequestDTO GetESignRequestByDocumentNo(string documentNo)
        {
            SignRequest r = SignDataServices.GetESignRequestByDocumentNo(documentNo);

            return(ESignMapper.Map(r));
        }
Example #6
0
 internal SignEvent(SignEventType eventType, SignRequest signRequest, string digitalSign)
 {
     this.EventType   = eventType;
     this.SignRequest = signRequest;
     this.DigitalSign = digitalSign;
 }
Example #7
0
 internal SignEvent(SignEventType eventType, SignRequest signRequest) :
     this(eventType, signRequest, String.Empty)
 {
 }
Example #8
0
        static internal FixedList <SignRequest> Map(FixedList <string> source)
        {
            var enumerable = source.Select(uid => SignRequest.Parse(uid));

            return(new FixedList <SignRequest>(enumerable));
        }