Exemplo n.º 1
0
        public static Activity GetAccount()
        {
            ApiConsumption          vObjApi   = new ApiConsumption();
            var                     response  = vObjApi.ApiFactory("", "");
            AdaptiveCardParseResult parseJson = AdaptiveCard.FromJson(response);
            AdaptiveCard            card      = parseJson.Card;
            Attachment              attach    = new Attachment()
            {
                ContentType = AdaptiveCard.ContentType,
                Content     = card
            };
            var reply = MessageFactory.Attachment(attach);

            return(reply as Activity);
        }
Exemplo n.º 2
0
        public static string GetCertificate()
        {
            try
            {
                ApiConsumption vObjApi     = new ApiConsumption();
                var            bytes       = vObjApi.ApiWorkCertificate("", "");
                byte[]         actualBytes = Convert.FromBase64String(bytes);

                return(bytes);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Exemplo n.º 3
0
 public static Activity GetCertificate1()
 {
     try
     {
         ApiConsumption vObjApi      = new ApiConsumption();
         var            bytes        = vObjApi.ApiWorkCertificateByte("", "");
         var            base64String = bytes;
         var            image64      = "data:application/pdf;base64," + base64String;
         var            Attachments  = new List <Attachment>
         {
             new Attachment(contentType: "application/pdf", contentUrl: image64, name: "CertificadoLaboral.pdf")
         };
         var reply = MessageFactory.Attachment(Attachments, "CertificadoLaboral");
         return(reply as Activity);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }