Ejemplo n.º 1
0
        public string GenerateAcknowledgementResponseXml(SharedInfo info, Acknowledgement acknowledgement1, Acknowledgement acknowledgement2, bool flag)
        {
            var compiler = new Compiler();

            if (flag)
            {
                compiler.AddKey("ClientCode", info.ClientCode)
                .AddKey("ProviderKey", info.ProviderKey)
                .AddKey("ReceiptId", info.ReceiptId)
                .AddKey("CustomerNumber", info.CustomerNumber)
                .AddKey("AssessmentUrl", acknowledgement1.AssessmentUrl)
                .AddKey("Description", acknowledgement1.Description)
                .AddKey("Status", acknowledgement1.Status)
                .AddKey("StatusDate", acknowledgement1.StatusDate);
            }
            else
            {
                compiler.AddKey("ClientCode", info.ClientCode)
                .AddKey("ProviderKey", info.ProviderKey)
                .AddKey("ReceiptId", info.ReceiptId)
                .AddKey("CustomerNumber", info.CustomerNumber)
                .AddKey("AssessmentUrl", acknowledgement2.AssessmentUrl)
                .AddKey("Description", acknowledgement2.Description)
                .AddKey("Status", acknowledgement2.Status)
                .AddKey("StatusDate", acknowledgement2.StatusDate);
            }


            var path   = Directory.GetCurrentDirectory() + "/Controllers/Requests/AcknowledgementTemplate.xml";
            var result = compiler.CompileXml(path);

            return(result);
        }
Ejemplo n.º 2
0
        public string GenerateAcknowledgementResponseXml(Client client, Acknowledgement acknowledgement)
        {
            var compiler = new Compiler();

            compiler.AddKey("ClientCode", client.ClientCode)
            .AddKey("ProviderKey", client.ProviderKey)
            .AddKey("ReceiptId", "Receipt:001")
            .AddKey("CustomerNumber", client.CustomerNumber)
            .AddKey("AssessmentUrl", acknowledgement.AssessmentUrl)
            .AddKey("Description", acknowledgement.Description)
            .AddKey("Status", acknowledgement.Status)
            .AddKey("StatusDate", acknowledgement.StatusDate);

            //var path = Directory.GetCurrentDirectory() + "/Controllers/Requests/AcknowledgementTemplate.xml";
            var path   = "C:\\Users\\lenovo\\Desktop\\1129\\Capstone-MISM\\MVC5_Seed_Project\\Inspinia_MVC5_SeedProject\\Controllers\\Requests\\AcknowledgementTemplate.xml";
            var result = compiler.CompileXml(path);

            return(result);
        }