private void CargarComboSujetos() { try { using (WsSistemaBancario.VentanillaServiceClient ventanilla = new WsSistemaBancario.VentanillaServiceClient()) { this.cmbVentanillas.DataSource = ventanilla.GetVentanillasXSucursal(Convert.ToInt32(this.session.SucursalCodigo), Convert.ToInt32(this.session.Turno.Id)); this.cmbVentanillas.ValueMember = "Id_ventanilla"; this.cmbVentanillas.DisplayMember = "Descripcion"; } } catch (Exception) { MessageBox.Show("Ocurrio un error al cargar ventanillas en el combo"); } }
private void CargarComboSujetos() { try { using (WsSistemaBancario.VentanillaServiceClient ventanilla = new WsSistemaBancario.VentanillaServiceClient()) { VentanillaModel[] ventanillas = ventanilla.GetVentanillasXSucursal(Convert.ToInt32(this.session.SucursalCodigo), Convert.ToInt32(session.Turno.Id)); if (ventanillas is null) { alert1.Show(MessageType.ERROR, "Ocurrio un error al cargar las ventanillas"); return; } this.cmbVentanillas.DataSource = ventanillas; this.cmbVentanillas.ValueMember = "Id_ventanilla"; this.cmbVentanillas.DisplayMember = "Descripcion"; } } catch (Exception ex) { //MessageBox.Show("Ocurrio un error al cargar ventanillas en el combo"); alert1.Show(MessageType.ERROR, $"Ocurrio un error al cargar las ventanillas: {ex.Message}"); } }