private void btnConsultarID_Click_1(object sender, EventArgs e)
 {
     if (txtNoIdentidadEstudiante.Text != string.Empty && txtNoIdentidadEstudiante.TextLength == 13 && utilidades.isNumeric(txtNoIdentidadEstudiante.Text) == true)
     {
         if (dbConn.obtenerVariableString("SELECT id_Estudiante FROM detalleMensualidades WHERE id_Estudiante = '" + txtNoIdentidadEstudiante.Text + "'") != null)
         {
             dbConn.llenarDGV(dgvHistorialPagos, "Select id_Mensualidad as 'ID', fechaFacturacion as 'FECHA DE FACTURACION', fechaPago as 'FECHA DE PAGO', deudaPendiente as 'DEUDA', " +
                              "saldoDisponible as 'SALDO', descuentoMensualidad as 'DESCUENTO' from detalleMensualidades WHERE id_Estudiante = '" + txtNoIdentidadEstudiante.Text + "'");
             dbConn.llenarTextBox(txtNombreEstudiante, "SELECT concat(primerNombre, ' ', segundoNombre, ' ', primerApellido, ' ', segundoApellido) FROM datosEstudiante WHERE identidadEstudiante = " + txtNoIdentidadEstudiante.Text);
             dbConn.llenarTextBox(txtNombrePadre, "SELECT concat(primerNombre, ' ', segundoNombre, ' ', primerApellido, ' ', segundoApellido) " +
                                  "FROM datosEncargado de inner join matricula m on de.identidadEncargado = m.id_EncargadoAlumno WHERE m.id_Estudiante = " + txtNoIdentidadEstudiante.Text);
             lblPendientePago.Text = "Pendiente de Pago: Lps. " + dbConn.obtenerVariableDouble("SELECT TOP 1(deudaPendiente) FROM detalleMensualidades WHERE id_Estudiante = '" + txtNoIdentidadEstudiante.Text + "' ORDER BY id_Mensualidad DESC");
         }
         else
         {
             boxError.lblError.Text      = "NUMERO DE IDENTIDAD \r\n INEXISTENTE";
             boxError.lblError.Location  = new Point(115, 74);
             boxError.lblError.TextAlign = ContentAlignment.MiddleCenter;
             boxError.ShowDialog();
             txtNoIdentidadEstudiante.Focus();
         }
     }
     else
     {
         boxError.lblError.Text     = "VERIFIQUE LOS VALORES";
         boxError.lblError.Location = new Point(130, 82);
         boxError.ShowDialog();
         txtNoIdentidadEstudiante.Focus();
     }
 }
Esempio n. 2
0
        private void cmbCurso_SelectedIndexChanged(object sender, EventArgs e)
        {
            clsVariablesGlobales.idCursoImprimir = dbConn.obtenerVariableEntera("SELECT id_Curso FROM cursos WHERE nombreCurso = '" + cmbCurso.SelectedItem.ToString() + "'");

            if (cmbCurso.Items.Count > 0)
            {
                dbConn.llenarDGV(dgvSecciones, "SELECT A.id_Seccion as 'ID', FORMAT(A.fechaCreacion, 'dd/MM/yyyy') as 'Fecha de Registro', A.nombreSeccion as 'Seccion', CONCAT(B.primerNombre, ' ',B.segundoNombre, ' ',B.primerApellido, ' ', B.segundoApellido) as 'Docente', descripcionEstado as 'Estado' FROM seccion A INNER JOIN datosEmpleados B ON A.id_Docente = B.identidadPersona INNER JOIN estados C ON C.id_Estado = A.estado WHERE A.id_Curso = " + clsVariablesGlobales.idCursoImprimir);
            }
        }
        //--------------------------Grupbox Seleccion Alumno-------------------------------------

        private void gpxSeleccionAlumno_VisibleChanged(object sender, EventArgs e)
        {
            dbConn.llenarDGV(dgvSeleccionAlumno, "SELECT dbo.datosEstudiante.identidadEstudiante as 'Identidad del Estudiante', CONCAT(dbo.datosEstudiante.primerNombre,' ', dbo.datosEstudiante.segundoNombre,' ', dbo.datosEstudiante.primerApellido,' ', dbo.datosEstudiante.segundoApellido) as 'Nobre del Estudiante'," +
                             " dbo.cursos.nombreCurso as Curso, dbo.seccion.nombreSeccion as Sección FROM     dbo.datosEstudiante INNER JOIN" +
                             " dbo.matricula ON dbo.datosEstudiante.identidadEstudiante = dbo.matricula.id_Estudiante INNER JOIN " +
                             "dbo.detalleMatricula ON dbo.matricula.id_RegistroMatricula = dbo.detalleMatricula.id_RegistroMatricula INNER JOIN " +
                             "dbo.cursos ON dbo.detalleMatricula.id_Curso = dbo.cursos.id_Curso INNER JOIN dbo.seccion ON" +
                             " dbo.detalleMatricula.id_Seccion = dbo.seccion.id_Seccion AND dbo.cursos.id_Curso = dbo.seccion.id_Curso Where" +
                             " dbo.cursos.nombreCurso = '" + Herencia_de_Variables.CursoG + "' and dbo.seccion.nombreSeccion = '" + Herencia_de_Variables.SeccionG + "' and [dbo].[detalleMatricula].[estado] = 1"); //and [dbo].[detalleMatricula].[estado] = 2
        }
Esempio n. 4
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (cmbCurso.SelectedIndex != 0)
         {
             if (dbConn.obtenerVariableEntera("SELECT count(id_DetalleNotas) FROM[dbo].[detalleNotas] A INNER JOIN[dbo].[clasesCurso] B ON A.id_Clase = B.id_Clase INNER JOIN[dbo].[cursos] C ON B.id_Curso = C.id_Curso INNER JOIN[dbo].[detalleMatricula] D ON A.id_DetalleMatricula = D.id_DetalleMatricula INNER JOIN[dbo].[matricula] E ON D.id_RegistroMatricula = E.id_RegistroMatricula WHERE E.id_Estudiante = '" + identidadEstudiante + "' AND C.nombreCurso = '" + cmbCurso.SelectedItem.ToString() + "'") != 0)
             {
                 dbConn.llenarDGV(dgvNotas, "SELECT C.[nombreCurso] as 'Curso', B.[nombreClase] as 'Nombre Clase', A.[nota1erParcial] as 'I Parcial', A.[nota2doParcial] as 'II Parcial', A.[nota3erParcial] as 'III Parcial', A.[nota4toParcial] as 'IV Parcial', A.[notaFinal] AS 'Promedio' FROM[dbo].[detalleNotas] A INNER JOIN[dbo].[clasesCurso] B ON A.id_Clase = B.id_Clase INNER JOIN[dbo].[cursos] C ON B.id_Curso = C.id_Curso INNER JOIN[dbo].[detalleMatricula] D ON A.id_DetalleMatricula = D.id_DetalleMatricula INNER JOIN[dbo].[matricula] E ON D.id_RegistroMatricula = E.id_RegistroMatricula WHERE E.id_Estudiante = '" + identidadEstudiante + "' AND C.nombreCurso = '" + cmbCurso.SelectedItem.ToString() + "'");
             }
         }
         else
         {
             dgvNotas.DataSource = "";
         }
     }
     catch
     {
         dgvNotas.DataSource = null;
     }
 }
 private void btnEncargados_Click(object sender, EventArgs e)
 {
     gbListadoEncargado.Visible            = true;
     pnlGestionEstudianteEncargado.Visible = false;
     dbConn.llenarDGV(dgvBusquedaEncargado, "SELECT identidadEncargado as 'Identidad', CONCAT(primerNombre, ' ', segundoNombre, ' ', primerApellido, ' ' , segundoApellido)as 'Nombre', numeroTelefono as 'Teléfono 1', numeroTelefonoAlt as 'Teléfono 2', correoElectronico as 'Correo Electronico', direccionTrabajo as 'Dirección', fechaNacimiento as 'Fecha de Nacimiento' FROM datosEncargado WHERE CONCAT(primerNombre, ' ', segundoNombre, ' ', primerApellido, ' ', segundoApellido) LIKE '" + txtLikeIdentidad.Text + "%' and estado = 1 or identidadEncargado LIKE '" + txtLikeIdentidad.Text + "%' and estado = 1");
 }
 private void actualizarDGV()
 {
     dbConn.llenarDGV(dgvCursos, "select [nombreCurso] as 'Nombre Curso', [precioCompleto] as 'Precio', es.[descripcionEstado] as 'Estado' from [dbo].[cursos]c join[dbo].[estados]es on c.[estadoCurso] = es.[id_Estado] where es.[descripcionEstado] = 'Activo'");
 }
Esempio n. 7
0
        private void IfrmSeleccionarTipoInicio_Load(object sender, EventArgs e)
        {
            ClsCambioTema.cambiarTemaBoton(panel1);
            if (Properties.Settings.Default.isModoOscuro == true)
            {
                panel1.BackColor       = System.Drawing.Color.FromArgb(51, 52, 69);
                picImagotipo.BackColor = System.Drawing.Color.FromArgb(51, 52, 69);
            }
            else
            {
                panel1.BackColor       = System.Drawing.Color.FromArgb(9, 141, 216);
                picImagotipo.BackColor = System.Drawing.Color.FromArgb(0, 97, 169);
            }

            int codigoTipos = 0;

            dbConn.llenarDGV(dgvTiposCargos, "SELECT descripcionCargo FROM datosEmpleados de INNER JOIN detalleCargos dc ON de.identidadPersona = dc.identidadEmpleado " +
                             "INNER JOIN cargos c ON dc.idCargoAsociado = c.id_Cargo WHERE de.identidadPersona = '" + clsVariablesGlobales.NumIdentidad + "' ");
            string nombre = dbConn.obtenerVariableString("SELECT CONCAT(primerNombre, ' ', segundoNombre) FROM datosEmpleados WHERE identidadPersona = '" + clsVariablesGlobales.NumIdentidad + "' ");

            lblSaludo.Text = "BUEN DÍA " + nombre.ToUpper() + ", ESPERAMOS QUE TENGAS UN EXCELENTE DÍA.";
            foreach (DataGridViewRow Datarow in dgvTiposCargos.Rows)
            {
                if (Datarow.Cells[0].Value.ToString() == "Super Usuario")
                {
                    codigoTipos = -1;
                }
                else if (Datarow.Cells[0].Value.ToString() == "Administrador")
                {
                    codigoTipos += 1;
                }
                else if (Datarow.Cells[0].Value.ToString() == "Docente")
                {
                    codigoTipos += 2;
                }
                else if (Datarow.Cells[0].Value.ToString() == "Medico")
                {
                    codigoTipos += 5;
                }
            }

            switch (codigoTipos)
            {
            case -1:
                btnSuperUsuario.Visible = true;
                break;

            case 1:
                btnAdmin.Visible = true;
                break;

            case 2:
                btnDocenteSolo.Visible = true;
                break;

            case 3:
                btnDocenteMasAdmin.Visible = true;
                btnAdmin.Visible           = true;
                break;

            case 5:
                btnMedico.Visible = true;
                break;

            case 6:
                btnAdmin.Visible  = true;
                btnMedico.Visible = true;
                break;

            case 7:
                btnDocenteMasAdmin.Visible = true;
                btnMedico.Visible          = true;
                break;

            case 8:
                btnAdmin.Visible           = true;
                btnDocenteMasAdmin.Visible = true;
                btnMedico.Visible          = true;
                break;
            }

            btnSalir.ForeColor   = Color.White;
            btnSalir.Active1     = Color.Red;
            btnSalir.Active2     = Color.Red;
            btnSalir.Inactive1   = Color.Red;
            btnSalir.Inactive2   = Color.Red;
            btnSalir.StrokeColor = Color.Red;

            btnAtras.ForeColor   = Color.White;
            btnAtras.Active1     = Color.Red;
            btnAtras.Active2     = Color.Red;
            btnAtras.Inactive1   = Color.Red;
            btnAtras.Inactive2   = Color.Red;
            btnAtras.StrokeColor = Color.Red;
        }