示例#1
0
        public static SigoCreditosInfoModel ObtenerPuntosxCliente(int pCodTipo, string pDocumento)
        {
            wsCRM.IwsCRMClient    cRMClient = new wsCRM.IwsCRMClient(wsCRM.IwsCRMClient.EndpointConfiguration.BasicHttpBinding_IwsCRM);
            Task <wsCRM.mCliente> result    = cRMClient.ObtenerPuntosxClienteAsync(pCodTipo, pDocumento);

            return(new SigoCreditosInfoModel(result.Result));
        }
示例#2
0
        /// <summary>
        /// Asigna codigos giftcard a un cliente.
        /// </summary>
        /// <param name="pGifcardModel"></param>
        /// <returns></returns>
        public static wsCRM.mAbonosCredito EnviarGiftCard(SigoCreditosInfoModel pGifcardModel)
        {
            try
            {
                wsCRM.mCliente client = cRMClient.ObtenerPuntosxClienteAsync(pGifcardModel.Abono.Receptor.TipoDocumento, pGifcardModel.Abono.Receptor.Documento).Result;

                // var result=  cRMClient.CrearVenderGiftCardAsync(0, pGifcardModel.Abono.Receptor.EntityId, client, 1, 2, Convert.ToDecimal(pGifcardModel.Abono.MontoTransaccionGiftCard), "Dolares", true).Result;
                var vResult = new wsCRM.mAbonosCredito
                {
                    Cod_Abono = 0//result
                };

                return(vResult);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#3
0
        public static wsCRM.mAbonosCredito AbonarPuntos(SigoCreditosInfoModel pModel)
        {
            try
            {
                wsCRM.IwsCRMClient cRMClient = new wsCRM.IwsCRMClient(wsCRM.IwsCRMClient.EndpointConfiguration.BasicHttpBinding_IwsCRM);
                wsCRM.mCliente     clienteA  = new wsCRM.mCliente();
                wsCRM.mCliente     client    = pModel.AddBalanceModel.OwnerBalance == 1
                ? new wsCRM.mCliente()
                {
                    Cod_SigoClub = pModel.AddBalanceModel.CustomerSigoClubId, Cedula = pModel.CustomerDocumentValue
                }
                : cRMClient.ObtenerPuntosxClienteAsync(pModel.AddBalanceModel.ReceiverDocumentType, pModel.AddBalanceModel.ReceiverDocumentValue).Result;

                // wsCRM.mAbonosCredito result = cRMClient.GenerarAbonoPuntosAsync(client.Cod_SigoClub, "00", 2, new wsCRM.mCliente(), "", pModel.AddBalanceModel.TransactionAmount, 13440, 44, "", false, "Dolar", (wsCRM.CodigosTipoOperacionMov)TipoOperacionMov.EcormmerceAbonoSaldo, -1).Result;
                // wsCRM.mAbonosCredito result = cRMClient.GenerarAbonoPuntosAsync(client.Cod_SigoClub, "00", 2, new wsCRM.mCliente(), "", pModel.AddBalanceModel.TransactionAmount, 13440, 44, "", false, "Dolar", (wsCRM.CodigosTipoOperacionMov)TipoOperacionMov.CRMAbobodirectodesaldo, -1).Result;
                return(cRMClient.GenerarAbonoPuntosAsync(client.Cod_SigoClub, "00", 2, clienteA, "", Convert.ToDecimal(pModel.AddBalanceModel.TransactionAmount.Replace(".", string.Empty).Replace(",", ".").Trim()), 0, 44, "", false, "Dolar", (wsCRM.CodigosTipoOperacionMov)TipoOperacionMov.EcormmerceAbonoSaldo, -1).Result);
                //return CRMAbobodirectodesaldo
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#4
0
 public static bool EnviarGiftCard(SigoCreditosGiftCardModel pGifcardModel)
 {
     wsCRM.mCliente client = cRMClient.ObtenerPuntosxClienteAsync(pGifcardModel.DocumentType, pGifcardModel.DocumentValue).Result;
     return(!(client is null) && cRMClient.VenderGiftCardAsync(0, pGifcardModel.EntityId, client, 1, 2, pGifcardModel.Amount, "Dolares").Result > 0);
 }