Example #1
0
        public void UpdateSignature(Models.Signature updatedSignature)
        {
            var result = _context.Signatures.Find(updatedSignature.SignatureId);

            if (result != null)
            {
                result.Status = updatedSignature.Status;
                result.UTCDateTimeLastUpdated = DateTime.UtcNow;
                _context.SaveChanges();
            }
        }
Example #2
0
        public void Initialize()
        {
            IJsonConfiguration config = new JsonConfiguration();

            _repo = new Repository();
            _repo.InitializeContext(config.ConnectionString);
            _preFabSignature             = new DataModels.Signature();
            _preFabSignature.EnvelopeId  = Guid.Parse("4a39ce48-cdcd-466d-9c68-4b7c8529a211");
            _preFabSignature.TemplateId  = Guid.Parse("4a39ce48-cdcd-466d-9c68-4b7c8529a211");
            _preFabSignature.RequestBody = "{" +
                                           "  \"docuSignUsername\": \"slewarne @epiqsystems.com\"," +
                                           "  \"docuSignPassword\": \"P@ssword1\",  " +
                                           "  \"docuSignTemplateId\": \"4a39ce48-cdcd-466d-9c68-4b7c8529a211\"," +
                                           "  \"emailAddress\": [\"[email protected]\",\"[email protected]\"]," +
                                           "  \"subject\": \"DocuSign document is ready to sign\"," +
                                           "  \"name\" : \"Marty Mazurik\"," +
                                           "  \"fields\": [" +
                                           "        {" +
                                           "            \"name\": \"Text c649cc4c-29b8-4a3a-bbc0-691775d8a693\"," +
                                           "            \"fieldType\": \"Text\"," +
                                           "            \"dataType\": \"string\"," +
                                           "            \"value\" : \"some text\"" +
                                           "        }," +
                                           "        {" +
                                           "            \"name\": \"Note 970f97e8-272e-41ab-9801-b5bef15e120c\"," +
                                           "            \"fieldType\": \"Note\"," +
                                           "            \"dataType\": \"string\"," +
                                           "            \"value\": \"Note, duly noted.\"" +
                                           "        }," +
                                           "        {" +
                                           "            \"name\": \"Checkbox 0360f6d2-eab3-4da6-8623-45aa693fac17\"," +
                                           "            \"fieldType\": \"Checkbox\"," +
                                           "            \"dataType\": \"boolean\"," +
                                           "            \"value\": \"true\"" +
                                           "        }" +
                                           "]}";
            _preFabSignature.ResponseBody = "{" +
                                            "    \"meta\": {" +
                                            "            }," +
                                            "    \"data\": [" +
                                            "        {" +
                                            "            \"email\": \"[email protected]\"," +
                                            "            \"envelopeId\": \"0cc930d8-9604-45cf-92c4-f8cad93bcca7\"," +
                                            "            \"statusDateTime\": \"05/08/2018 20:49:20\"" +
                                            "        }" +
                                            "    ]}";
            _preFabSignature.Status = "Sent";
        }
Example #3
0
 public void CreateSignature(Models.Signature newSignature)
 {
     newSignature.UTCDateTimeCreated = DateTime.UtcNow;
     _context.Add(newSignature);
     _context.SaveChanges();
 }
Example #4
0
 public void RepoGetSingleSignatureTest()
 {
     DataModels.Signature foundOne = _repo.ReadSignature(1);
 }