TarjetaModel BuscarTarjeta() { try { TarjetaModel tarjeta = new TarjetaModel(); frmLista = new FrmListaDatos(); listaTarjetas = BLTarjeta.tarjetasSelectAll(); frmLista.CrearLista <TarjetaModel>(listaTarjetas); if (frmLista.ShowDialog() == DialogResult.OK) { tarjeta = listaTarjetas[frmLista.ObtenerIndice()]; txtTarjeta.Text = ""; txtTarjeta.Text = tarjeta.Numero.ToString(); cuentaUsuario.Id_tarjeta = int.Parse(tarjeta.Numero.Replace(" ", "")); btnProceder.Enabled = true; } ; return(tarjeta); } catch (Exception) { MetroFramework.MetroMessageBox.Show(this, "Hubo un error"); return(null); } }
PersonaModel BuscarPorDNI(TextBox dni) { PersonaMethods persona = new PersonaMethods(); CuentasMethods cuentas = new CuentasMethods(); frmLista = new FrmListaDatos(); if (!Clases.RegularExpressions.ValidarDNI(dni.Text)) { MetroFramework.MetroMessageBox.Show(this, "Ingrese un DNI valido compuesto de 8 numeros"); return(null); } else { listaClientes = persona.personaSelectbyNroDocumento(dni.Text); frmLista.CrearLista <PersonaModel>(listaClientes); if (frmLista.ShowDialog() == DialogResult.OK) { usuario = listaClientes[frmLista.ObtenerIndice()]; txtDNI.Text = usuario.Nrodocumento; txtDNI.Enabled = false; btnBuscar.Enabled = false; listaCuentas = cuentas.ListaCuentas(usuario.Nrodocumento).Where(x => x.TipoCuenta != "CORRIENTE").ToList(); DatosCuenta(); modoInicial(); } ; return(usuario); } }
PersonaModel BuscarPorDNI(TextBox dni) { PersonaModel usuario = new PersonaModel(); PersonaMethods persona = new PersonaMethods(); frmLista = new FrmListaDatos(); if (!Clases.RegularExpressions.ValidarNumeros(dni.Text)) { MetroFramework.MetroMessageBox.Show(this, "Ingrese un DNI valido compuesto de 8 numeros"); return(null); } else { listaClientes = persona.personaSelectbyNroDocumento(dni.Text); frmLista.CrearLista <PersonaModel>(listaClientes); if (frmLista.ShowDialog() == DialogResult.OK) { usuario = listaClientes[frmLista.ObtenerIndice()]; modoInicial(); txtDNI.Text = usuario.Nrodocumento.ToString(); } ; return(usuario); } }
private void btnCodigo_Click(object sender, EventArgs e) { ChequerasModel chequera = new ChequerasModel(); List <ChequerasModel> chequeras = BLChequeras.ChequerasSelectByNumeroDocumento(txtDNI.Text); if (chequeras == null && chequeras.Count <= 0) { return; } frmLista = new FrmListaDatos(); frmLista.CrearLista <ChequerasModel>(chequeras); if (frmLista.ShowDialog() == DialogResult.OK) { string idChequera = frmLista.val1; this.clearForm(); txtCodigo.Text = idChequera; try { gChequera = BLChequeras.GetChequerasModel(Int32.Parse(idChequera)); } catch (Exception) { MessageBox.Show("No se selecciono ninguna chequera"); return; } this.chequera2gui(gChequera); this.modoEdicion(); if (cboEstado.SelectedValue.ToString() == "EMITIDA") { cboEstado.Enabled = false; } } ; }
private void BtBuscar_Click(object sender, EventArgs e) { PersonaMethods persona = new PersonaMethods(); frmLista = new FrmListaDatos(); // persona.personaSelectbyNombres(TbNombre.Text); frmLista.CrearLista <PersonaU>(persona.personaSelectbyNombresApellidos(TbNombre.Text)); if (frmLista.ShowDialog() == DialogResult.OK) { TBDni.Text = frmLista.val2; TbNombre.Text = frmLista.val1; } ; }
private void btnBuscar_Click(object sender, EventArgs e) { if (!Clases.RegularExpressions.ValidarDNI(txtDNI.Text) || String.IsNullOrEmpty(txtDNI.Text)) { MetroFramework.MetroMessageBox.Show(this, "Ingrese un DNI valido compuesto de 8 numeros"); return; } frmLista = new FrmListaDatos(); listaClientes = persona.personaSelectbyNroDocumento(txtDNI.Text); frmLista.CrearLista <PersonaModel>(listaClientes); if (frmLista.ShowDialog() == DialogResult.OK) { Cliente = null; Cliente = listaClientes[frmLista.ObtenerIndice()]; } ; }
public void LlamadaVentana() { frm = new FrmListaDatos(dni1.TBDni.Text); frm.textBox1.TextChanged += TextBox1_TextChanged; cuentas = new CuentasMethods(); var Lista = cuentas.ListaCuentas(dni1.TBDni.Text); frm.CrearLista <CuentasPersona>(cuentas.ListaCuentas(dni1.TBDni.Text)); if (frm.ShowDialog() == DialogResult.OK) { TBNroCuenta.Text = frm.val1; Lbestado.Text = frm.val2; try { validar = new CuentasMethods(); var Cuenta = validar.ValidarCuenta(TBNroCuenta.Text); // LbPersona.Text = "Cliente: " + Cuenta.Cliente; Lbestado.Text = Cuenta.Estado; Lbmoneda.Text = Cuenta.Moneda; VersionCuenta = Cuenta.Version; EstadoCuenta = Cuenta.Estado; groupBox1.Enabled = true; if (Cuenta.TipoCuenta == "CORRIENTE") { rbtnCorriente.Checked = true; } else { rbtnAhorros.Checked = true; } // LbPersona.Visible = true; groupBox1.Enabled = false; Lbestado.Visible = true; Lbmoneda.Visible = true; } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } } }
private void btnCuenta_Click(object sender, EventArgs e) { CuentasModel cuenta = new CuentasModel(); cuentas = new CuentasMethods(); List <CuentasPersona> cuentasUsuario = cuentas.ListaCuentas(txtDNI.Text).Where(x => x.TipoCuenta == "CORRIENTE").ToList(); if (cuentasUsuario == null && cuentasUsuario.Count <= 0) { return; } frmLista = new FrmListaDatos(); frmLista.CrearLista <CuentasPersona>(cuentasUsuario); if (frmLista.ShowDialog() == DialogResult.OK) { string numeroCuenta = frmLista.val1; this.clearForm(); txtCuenta.Text = numeroCuenta; gCuenta = BLCuenta.cuentaSelectbyNroCuenta(numeroCuenta)[0]; this.cuenta2gui(gCuenta); } ; }
private void TextBox1_TextChanged(object sender, EventArgs e) { frm.CrearLista <CuentasPersona>(cuentas.ListaCuentas(dni1.TBDni.Text)); }