public void anadirCeldasAdmin() { string[] row = null; String mod = Procesos_Alumno.ObtenerModalidadPago(alumno.getModalidad()); string[] row1 = Procesos_Alumno.obtenerDocumentacion(alumno.getId()); row = new string[] { mod, "$" + Procesos_Alumno.ObtenerAdeudos(alumno.getId()).ToString(), row1[0], row1[1], row1[2], row1[3] }; tablaAdmin.Rows.Add(row); }
public EditarUsuario(Alumno alumno, float adeudos) { InitializeComponent(); this.alumno = alumno; this.adeudos = adeudos; Sql con = new Sql(); SqlDataReader r = con.getReader("SELECT * FROM Informacion_pago"); r.Read(); String[] pagos = new String[4]; int i = 0; do { if (i == 0 || i == 1) { pagos[i] = "Prekinder. Inscripción: $" + r["Inscripcion"] + " Colegiatura: $" + r["Colegiatura"]; } else { pagos[i] = "Kinder. Inscripción: $" + r["Inscripcion"] + " Colegiatura: $" + r["Colegiatura"]; } i++; } while (r.Read()); this.cmbPago.Items.AddRange(new object[] { pagos[0], pagos[1], pagos[2], pagos[3] }); r.Close(); String[] rowCurp = Procesos_Alumno.obtenerDocumentacion(alumno.getId()); Boolean[] rowDocu = Procesos_Alumno.obtenerDocuBool(alumno.getId()); this.chkActa.Checked = rowDocu[0]; this.chkCopiaActa.Checked = rowDocu[1]; this.chkCopiasCartilla.Checked = rowDocu[2]; this.txtCURP.Text = rowCurp[3]; if (alumno.getGrupo().Equals("No") == true) { this.cmbGrupo.SelectedIndex = 0; } if (alumno.getGrupo().Equals("A ") == true) { this.cmbGrupo.SelectedIndex = 1; } if (alumno.getGrupo().Equals("B ") == true) { this.cmbGrupo.SelectedIndex = 2; } if (alumno.getGrupo().Equals("C ") == true) { this.cmbGrupo.SelectedIndex = 3; } this.cmbPago.SelectedIndex = alumno.getModalidad(); this.txtNombre.Text = alumno.getNombre().ToString(); this.txtApellido.Text = alumno.getApellido().ToString(); this.cmbSangre.Text = alumno.getSangre(); DateTime nuevo = alumno.getNacimiento(); this.cmbDay.SelectedIndex = nuevo.Day - 1; this.cmbMes.SelectedIndex = nuevo.Month - 1; this.cmbYear.SelectedIndex = nuevo.Year - 2005; this.txtCalle.Text = alumno.getCalle(); this.txtColonia.Text = alumno.getColonia(); this.txtTel.Text = alumno.getTelefono(); this.cmbGrado.SelectedIndex = alumno.getGrado(); this.Show(); }