private void btnFiltrar_Click(object sender, EventArgs e) { DateTime desdeFecha = new DateTime(calDesde.SelectionStart.Year, calDesde.SelectionStart.Month, calDesde.SelectionStart.Day); DateTime hastaFecha = new DateTime(calHasta.SelectionStart.Year, calHasta.SelectionStart.Month, calHasta.SelectionStart.Day); BL_Credito blCredito = new BL_Credito(); this.cliente.credito = blCredito.ObtenerCredito(cliente.perIdentificador, desdeFecha, hastaFecha); llenarGrid(); formatoGrid(); }
private void btnPagar_Click(object sender, EventArgs e) { if (txtAbono.Text == "") { MessageBox.Show("No ha ingresado un monto para abonar"); } else { BL_Credito blCredito = new BL_Credito(); blCredito.abonar(Convert.ToInt32(txtAbono.Text), cliente.perIdentificador); detallesEstadoCuenta.refrescarCreditoCompleto(); detallesEstadoCuenta.llenarGrid(); MessageBox.Show("Abono exitoso"); this.Dispose(); } }
private void dgvClientes_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (dgvClientes.Columns[e.ColumnIndex].Name.Equals("Editar")) { BL_Credito blCredito = new BL_Credito(); tbNombre.Text = dgvClientes.Rows[e.RowIndex].Cells["NombreCliente"].Value.ToString(); tbPrimerApellido.Text = dgvClientes.Rows[e.RowIndex].Cells["ApellidoCliente"].Value.ToString(); tbSegundoApellido.Text = dgvClientes.Rows[e.RowIndex].Cells["SegundoApellidoCliente"].Value.ToString(); tbDireccion.Text = dgvClientes.Rows[e.RowIndex].Cells["DireccionCliente"].Value.ToString(); tbTelefono.Text = dgvClientes.Rows[e.RowIndex].Cells["TelefonoCliente"].Value.ToString(); tbSegundoApellido.Text = dgvClientes.Rows[e.RowIndex].Cells["SegundoApellidoCliente"].Value.ToString(); tbEstado.Text = dgvClientes.Rows[e.RowIndex].Cells["EstadoCliente"].Value.ToString(); tbLimite.Text = blCredito.ObtenerDatosCredito(Convert.ToInt32(dgvClientes.Rows[e.RowIndex].Cells["IdentificadorCliente"].Value)).limiteCredito.ToString(); codigoCredito = Convert.ToInt32(dgvClientes.Rows[e.RowIndex].Cells["IdentificadorCliente"].Value); modificarClientes(); } }
public bool AgregarCredito(int identificadorCliente, int limiteCredito) { BL_Credito blCredito = new BL_Credito(); return(blCredito.CrearCredito(identificadorCliente, limiteCredito)); }
public bool ModificarCredito(DO_Cliente nuevoCliente) { BL_Credito blCredito = new BL_Credito(); return(blCredito.modificarLimite(nuevoCliente.perIdentificador, nuevoCliente.credito.limiteCredito)); }