private void cargarClientes() { string estado; clientes.Clear(); if (cmbestado.SelectedIndex == 0) { datostodos.DataSource = null; datostodos.Refresh(); estado = "Activo"; clientes = clienteService.MostrarEstado(estado); datostodos.DataSource = clientes; } else if (cmbestado.SelectedIndex == 1) { datostodos.DataSource = null; estado = "Inactivo"; clientes = clienteService.MostrarEstado(estado); datostodos.DataSource = clientes; datostodos.Refresh(); } else if (cmbestado.SelectedIndex == 2) { clientes = carteraService.CargarClientes(); datostodos.DataSource = clientes; datostodos.Refresh(); } }
private void inicializar() { cliente = new Cliente(); creditoService = new CreditoService(ConfigConnection.connectionString); carteraService = new CarteraService(ConfigConnection.connectionString); clienteService = new ClienteService(ConfigConnection.connectionString); clientes = carteraService.CargarClientes(); Pintartabla(); }
private void inizializar() { carteraService = new CarteraService(ConfigConnection.connectionString); creditoService = new CreditoService(ConfigConnection.connectionString); pagoService = new PagoService(ConfigConnection.connectionString); Cartera = carteraService.MostrarCartera(); //pagos = pagoService.MostrarPagos(); //Clientes = clienteService.MostrarClientes(); //Creditos = creditoService.MostrarCredito(); pagos = carteraService.CargarPagos(); Clientes = carteraService.CargarClientes(); Creditos = carteraService.CargarCredito(); PintarCartera(); PintarTablas(); }