private void BusquedaInteligente() { if (Negocio.MetodosChequera.EsNumero(this.txtLegajoApellido.Text)) { if(this.txtLegajoApellido.Text.Length==10) alu= Datos.datosBusquedaPagoCuotas.TraeALumnoLegajo(this.txtLegajoApellido.Text); else MessageBox.Show("La cantidad de digitos no es la establecida","Error",MessageBoxButtons.OK,MessageBoxIcon.Error); } else { frmBusquedaPagoCuotas frm =new frmBusquedaPagoCuotas(Datos.datosBusquedaPagoCuotas.TraerALumnoApellido(this.txtLegajoApellido.Text)); if (frm.ShowDialog() == DialogResult.OK) { alu = frm.UnAlumno; } } if (!object.Equals(alu,null)) { Entidades.Chequera unachequera = Datos.datosBusquedaPagoCuotas.TraerChequera(this.alu.IdLegajo.ToString()); this.txtCuota1.Text = unachequera.ImportePago1.ToString(); this.dateTimePicker1.Value = (DateTime)unachequera.FechaPago1; this.txtCuota2.Text = unachequera.ImportePago2.ToString(); this.dateTimePicker2.Value = (DateTime)unachequera.FechaPago2; this.txtCuota3.Text = unachequera.ImportePago3.ToString(); this.dateTimePicker3.Value = (DateTime)unachequera.FechaPago3; this.txtCuota4.Text = unachequera.ImportePago4.ToString(); this.dateTimePicker4.Value = (DateTime)unachequera.FechaPago4; this.txtCuota5.Text = unachequera.ImportePago5.ToString(); this.dateTimePicker5.Value = (DateTime)unachequera.FechaPago5; this.txtLegajo.Text = alu.IdLegajo.ToString(); this.txtNombreMostrar.Text = alu.Nombre; this.txtApellidoMostrar.Text = alu.Apellido; } }
private void btnBuscar_Click(object sender, EventArgs e) { frmBusquedaPagoCuotas frm = new frmBusquedaPagoCuotas(); frm.ShowDialog(); }