コード例 #1
0
        public FETributoResponse GetTiposTributos(FEAuthRequest feAuthRequest)
        {
            AfipWrapperServiceClient client = new AfipWrapperServiceClient();

            ClientCredentialHelper.SetCredentials(client.ClientCredentials);
            try
            {
                var t = client.GetTiposTributos(feAuthRequest);
                client.Close();
                return(t);
            }
            catch
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Abort();
                }

                throw;
            }
        }
コード例 #2
0
        public FEXResponse_Ctz GetFexCotizacion(ClsFEXAuthRequest fexAuthRequest, string monId)
        {
            AfipWrapperServiceClient client = new AfipWrapperServiceClient();

            ClientCredentialHelper.SetCredentials(client.ClientCredentials);
            try
            {
                var t = client.GetFexCotizacion(fexAuthRequest, monId);
                client.Close();
                return(t);
            }
            catch
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Abort();
                }

                throw;
            }
        }
コード例 #3
0
        public FEXResponse_Umed GetUnidadesDeMedida(ClsFEXAuthRequest fexAuthRequest)
        {
            AfipWrapperServiceClient client = new AfipWrapperServiceClient();

            ClientCredentialHelper.SetCredentials(client.ClientCredentials);
            try
            {
                var t = client.GetUnidadesDeMedida(fexAuthRequest);
                client.Close();
                return(t);
            }
            catch
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Abort();
                }

                throw;
            }
        }
コード例 #4
0
        public FEXResponseLast_CMP GetUltimoComprobanteAutorizado(ClsFEX_LastCMP fexLastCmp)
        {
            AfipWrapperServiceClient client = new AfipWrapperServiceClient();

            ClientCredentialHelper.SetCredentials(client.ClientCredentials);
            try
            {
                var t = client.GetUltimoComprobanteAutorizado(fexLastCmp);
                client.Close();
                return(t);
            }
            catch
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Abort();
                }

                throw;
            }
        }
コード例 #5
0
        public FEXResponse_Cbte_Tipo GetTiposComprobantes(ClsFEXAuthRequest fexAuthRequest)
        {
            AfipWrapperServiceClient client = new AfipWrapperServiceClient();

            ClientCredentialHelper.SetCredentials(client.ClientCredentials);
            try
            {
                var t = client.GetTiposComprobantes(fexAuthRequest);
                client.Close();
                return(t);
            }
            catch
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Abort();
                }

                throw;
            }
        }
コード例 #6
0
        public FEXResponse_CheckPermiso CheckPermiso(ClsFEXAuthRequest fexAuthRequest, string idPermiso, int destMerc)
        {
            AfipWrapperServiceClient client = new AfipWrapperServiceClient();

            ClientCredentialHelper.SetCredentials(client.ClientCredentials);
            try
            {
                var t = client.CheckPermiso(fexAuthRequest, idPermiso, destMerc);
                client.Close();
                return(t);
            }
            catch
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Abort();
                }

                throw;
            }
        }
コード例 #7
0
        public FEXResponseAuthorize AutorizarComprobanteExportacion(ClsFEXAuthRequest fexAuthRequest, ClsFEXRequest fexRequest)
        {
            AfipWrapperServiceClient client = new AfipWrapperServiceClient();

            ClientCredentialHelper.SetCredentials(client.ClientCredentials);
            try
            {
                var t = client.AutorizarComprobanteExportacion(fexAuthRequest, fexRequest);
                client.Close();
                return(t);
            }
            catch
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Abort();
                }

                throw;
            }
        }
コード例 #8
0
        public FEAuthRequest ObtenerTicket()
        {
            AfipWrapperServiceClient client = new AfipWrapperServiceClient();

            ClientCredentialHelper.SetCredentials(client.ClientCredentials);
            try
            {
                var t = client.ObtenerTicket();
                client.Close();
                return(t);
            }
            catch
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Abort();
                }

                throw;
            }
        }
コード例 #9
0
        public FECompConsultaResponse CompConsultar(FEAuthRequest feAuthRequest, FECompConsultaReq feCompConsultaReq)
        {
            AfipWrapperServiceClient client = new AfipWrapperServiceClient();

            ClientCredentialHelper.SetCredentials(client.ClientCredentials);
            try
            {
                var t = client.CompConsultar(feAuthRequest, feCompConsultaReq);
                client.Close();
                return(t);
            }
            catch
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Abort();
                }

                throw;
            }
        }
コード例 #10
0
        public FERecuperaLastCbteResponse CompUltimoAutorizado(FEAuthRequest feAuthRequest, int ptoVta, int cbteTipo)
        {
            AfipWrapperServiceClient client = new AfipWrapperServiceClient();

            ClientCredentialHelper.SetCredentials(client.ClientCredentials);
            try
            {
                var t = client.CompUltimoAutorizado(feAuthRequest, ptoVta, cbteTipo);
                client.Close();
                return(t);
            }
            catch
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Abort();
                }

                throw;
            }
        }