public static WebServiceAfipDto ToWebServiceAfipDto(WebServiceAfip wsAfip) { WebServiceAfipDto dto = new WebServiceAfipDto(); dto.Id = wsAfip.Id; dto.Nombre = wsAfip.Nombre; dto.Descripcion = wsAfip.Descripcion; return(dto); }
private void cbWebService_SelectedIndexChanged(object sender, EventArgs e) { InicializarControles(); int panelSearchHeight = 0; this.txtResultados.Visible = true; if (cbWebService.SelectedItem != null) { bool mostrarPanelParametros = false; WebServiceAfipDto dto = cbWebService.SelectedItem as WebServiceAfipDto; string selectedValue = dto.Nombre.Trim(); if (selectedValue == GetCotizacionNombre) { mostrarPanelParametros = true; panelSearchHeight = this.panelMoneda.Height; this.CargarMonedas(); this.panelMoneda.Visible = true; } else if (selectedValue == GetTiposMonedasNombre || selectedValue == GetTiposCbtesNombre || selectedValue == GetTiposTributosNombre || selectedValue == GetTiposIvaNombre || selectedValue == GetTiposOpcionalNombre || selectedValue == GetTiposDocNombre || selectedValue == GetTiposConceptoNombre || selectedValue == FEXGetPARAM_Cbte_Tipo || selectedValue == FEXGetPARAM_DST_CUIT || selectedValue == FEXGetPARAM_DST_pais || selectedValue == FEXGetPARAM_Idiomas || selectedValue == FEXGetPARAM_Incoterms || selectedValue == FEXGetPARAM_MON || selectedValue == FEXGetPARAM_PtoVenta || selectedValue == FEXGetPARAM_Tipo_Expo || selectedValue == FEXGetPARAM_UMed) { this.gridResultados.Visible = true; this.gridResultados.DataSource = null; this.txtResultados.Visible = false; } else if (selectedValue == CompUltimoAutorizadoNombre) { this.txtPtoVta.Text = string.Empty; panelSearchHeight = this.panelUltimoCbte.Height; this.CargarTiposCbte(); mostrarPanelParametros = true; this.panelUltimoCbte.Visible = true; } else if (selectedValue == FEXGetCMP) { mostrarPanelParametros = true; this.CargarTiposCbteFex(); this.CargarPtosVtaFex(); panelSearchHeight = this.panelGetComprobanteFex.Height; this.txtNroCbteFex.Visible = this.lblNroCbteFex.Visible = true; this.panelGetComprobanteFex.Visible = true; } else if (selectedValue == FEXGetLast_CMP) { mostrarPanelParametros = true; this.CargarTiposCbteFex(); this.CargarPtosVtaFex(); this.txtNroCbteFex.Visible = this.lblNroCbteFex.Visible = false; panelSearchHeight = this.panelGetComprobanteFex.Height; this.panelGetComprobanteFex.Visible = true; } else if (selectedValue == FEXGetPARAM_Ctz) { mostrarPanelParametros = true; panelSearchHeight = this.panelMoneda.Height; this.CargarMonedasFex(); this.panelMoneda.Visible = true; } AcomodarControles(mostrarPanelParametros, panelSearchHeight); this.lblNombreWs.Text = dto.Nombre; this.lblDescripcionWs.Text = dto.Descripcion; } }