Exemplo n.º 1
0
        public string SendASK(string setId)
        {
            String result = string.Empty;

            try
            {
                result = KeepconSvc.SendASK(setId);
            }
            catch (Exception ex)
            {
                Fwk.Exceptions.TechnicalException te = new Fwk.Exceptions.TechnicalException(String.Format("CheckResult : SendASK lote {0} fallo", setId), ex);
                te.ErrorId = "1";
                throw te;//Helper.Log(Helper.ServiceName, te, false);
            }
            if (result.Equals("OK"))
            {
                KeepconSvc.SaveResult_ACK(setId);
            }

            return(result);
        }
Exemplo n.º 2
0
        public void CheckResult_From_Keepcon()
        {
            Helper.Log(Helper.ServiceName, "CheckResult_From_Keepcon: Iicio ", Fwk.Logging.EventType.Information, false);

            List <string> contentTypeList = KeepconSvc.Retrive_All_ContentType_To_Send();

            foreach (String contenType in contentTypeList)
            {
                Allus.Keepcon.Export.Export export = KeepconSvc.RetriveResult_2(contenType);
                if (export != null)
                {
                    Helper.Log(Helper.ServiceName, string.Format("CheckResult: Guardando resultado keepcont :Cantidad {0}, context type: {1}", export.Contents.Count, contenType), Fwk.Logging.EventType.Information, false);
                    KeepconSvc.SaveResult(export);
                    Helper.Log(Helper.ServiceName, string.Format("CheckResult: Se almacenaron {0} post, context type {1} ", export.Contents.Count, contenType), Fwk.Logging.EventType.Information, false);

                    SendASK(export.SetId);
                }
                else
                {
                    Helper.Log(Helper.ServiceName, string.Format("CheckResult: Las respuesta del chequeo arrojo un reult = null, context type: {0}", contenType), Fwk.Logging.EventType.Information, false);
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Send_To_Keepcon
        /// </summary>
        public void SendContent()
        {
            List <KeepconPost> posts = KeepconSvc.RetrivePost_To_Send();

            if (posts.Count != 0)
            {
                Helper.Log(Helper.ServiceName, string.Format("SendContent: Enviando {0} post", posts.Count.ToString()), Fwk.Logging.EventType.Information, false);
                List <string> custommerCareList = Allus.Keepcon.Import.Import.Retrive_CustommerCareList(posts);
                foreach (String customerCare in custommerCareList)
                {
                    List <KeepconPost>          postAux = posts.Where <KeepconPost>(p => p.KeepconCustomerCare.Equals(customerCare)).ToList <KeepconPost>();
                    Allus.Keepcon.Import.Import wImport = new Allus.Keepcon.Import.Import(postAux);
                    wImport.Contenttype = customerCare;
                    KeepconSvc.SendContent(wImport);
                }

                Helper.Log(Helper.ServiceName, string.Format("SendContent: Envio de {0} post: FINALIZADO", posts.Count.ToString()), Fwk.Logging.EventType.Information, false);
            }
            else
            {
                Helper.Log(Helper.ServiceName, string.Format("SendContent: No hay post para enviar", posts.Count.ToString()), Fwk.Logging.EventType.Information, false);
            }
        }
Exemplo n.º 4
0
 public void SaveResult(Export.Export export)
 {
     KeepconSvc.SaveResult(export);
 }