public override List<IValorRespuestaWS> ObtenerTiposDeComprobante( Autorizacion aut ) { AuthRequestType feAutRequest = this.wa.ConvertirMTXCA( aut ); CodigoDescripcionType evento; CodigoDescripcionType[] comprobantes = this.ws.consultarTiposComprobante( feAutRequest, out evento ); List<IValorRespuestaWS> tiposComprobante = new List<IValorRespuestaWS>(); Comprobante comprobante; foreach ( CodigoDescripcionType comp in comprobantes ) { comprobante = new Comprobante(); comprobante.Id = comp.codigo; comprobante.Descripcion = comp.descripcion; tiposComprobante.Add( comprobante ); } return tiposComprobante; }
public List<Comprobante> ObtenerTiposDeComprobante( Autorizacion aut ) { List<Comprobante> tiposComprobante = new List<Comprobante>(); try { ClsFEXAuthRequest feAutRequest = this.wa.ConvertirFex(aut); FEXResponse_Cbte_Tipo comprobantes = this.wsfe.FEXGetPARAM_Cbte_Tipo( feAutRequest ); this.managerErrores.CapturarError(comprobantes.FEXErr); Comprobante comprobante; foreach ( ClsFEXResponse_Cbte_Tipo comp in comprobantes.FEXResultGet ) { if ( comp != null ) { comprobante = new Comprobante(); comprobante.Id = comp.Cbte_Id; comprobante.Descripcion = comp.Cbte_Ds; tiposComprobante.Add( comprobante ); } } } catch (Exception ex) { throw ex; } return tiposComprobante; }
public override List<IValorRespuestaWS> ObtenerTiposDeComprobante( Autorizacion aut ) { FEAuthRequest feAutRequest = this.wa.ConvertirFe( aut ); CbteTipoResponse comprobantes = this.wsfe.FEParamGetTiposCbte( feAutRequest ); this.managerErrores.CapturarError( comprobantes.Errors ); List<IValorRespuestaWS> tiposComprobante = new List<IValorRespuestaWS>(); Comprobante comprobante; foreach ( CbteTipo comp in comprobantes.ResultGet ) { comprobante = new Comprobante(); comprobante.Id = comp.Id; comprobante.Descripcion = comp.Desc; tiposComprobante.Add( comprobante ); } return tiposComprobante; }