Example #1
0
        private void CbxGrado_SelectedIndexChanged(object sender, EventArgs e)
        {
            int clmat = NotasConsultas.ListCIMateria(cbxMateria.Text);
            int ci    = int.Parse(txtCIDOC.Text);

            datosNotas.DataSource = NotasConsultas.listar(clmat, cbxAñoCurso.Text, ci, cbxGrado.Text);
        }
Example #2
0
        private void BtnNotas_Click(object sender, EventArgs e)
        {
            panelNotas.Visible       = true;
            panelCambiarPass.Visible = false;
            cbxMateria.DataSource    = MateriasABML.ListNomMaterias();
            int clmat = NotasConsultas.ListCIMateria(cbxMateria.Text);
            int ci    = int.Parse(txtCIDOC.Text);

            datosNotas.DataSource = NotasConsultas.listar(clmat, cbxAñoCurso.Text, ci, cbxGrado.Text);

            sidePanel.Height = btnNotas.Height;
            sidePanel.Top    = btnNotas.Top;
        }
Example #3
0
 private void DatosNotas_Click(object sender, EventArgs e)
 {
     if (datosNotas.Rows.Count > 0)
     {
         txtCIALM.Text = NotasConsultas.ListCIAlumnos(datosNotas.CurrentRow.Cells["Nombre"].Value.ToString(), datosNotas.CurrentRow.Cells["Apellido"].Value.ToString()).ToString();
         txtnota1.Text = datosNotas.CurrentRow.Cells["Nota1"].Value.ToString();
         txtnota2.Text = datosNotas.CurrentRow.Cells["Nota2"].Value.ToString();
         txtnota3.Text = datosNotas.CurrentRow.Cells["Nota3"].Value.ToString();
         txtnotaf.Text = datosNotas.CurrentRow.Cells["Notaf"].Value.ToString();
         txtCIMAT.Text = NotasConsultas.ListCIMateria(cbxMateria.Text).ToString();
     }
     else
     {
         MessageBox.Show("No hay datos");
     }
 }
Example #4
0
        private void PlataformaUser_Load(object sender, EventArgs e)
        {
            string especialidad = NotasConsultas.listarespecialidad(int.Parse(txtCIDOC.Text));

            cbxMateria.DataSource = MateriasABML.ListNomMaterias();
            int clmat = MateriasABML.ListCIMateria(cbxMateria.Text);
            int ci    = int.Parse(txtCIDOC.Text);

            datosNotas.DataSource = alumnosABML.listar(clmat, cbxAñoCurso.Text, ci, cbxGrado.Text);

            using (SqlConnection conexion = Conexion.ObtenerConexion1())
            {
                SqlCommand    comando = new SqlCommand(string.Format(@"SELECT nombre,apellido,Especialidad FROM Docentes where CI_Docente = '{0}'", txtCIDOC.Text), conexion);
                SqlDataReader leer    = comando.ExecuteReader();
                while (leer.Read())
                {
                    nd.Text = leer.GetString(0);
                    ad.Text = leer.GetString(1);
                    ed.Text = leer.GetString(2);
                }
                conexion.Close();
            }
        }
        private void BtnSave_Click(object sender, EventArgs e)
        {
            PlataformaUser pU  = new PlataformaUser();
            Modulo         mod = new Modulo();

            mod.CI_Alumno     = int.Parse(txtCIAlm.Text);
            mod.CI_Docente    = int.Parse(txtCIDoc.Text);
            mod.Clave_Materia = int.Parse(txtCIMat.Text);
            mod.Nota1         = Math.Round(double.Parse(txtNota1.Text), 0);
            mod.Nota2         = Math.Round(double.Parse(txtNota2.Text), 0);
            mod.Nota3         = Math.Round(double.Parse(txtNota3.Text), 0);
            double Notaf = Math.Round((double.Parse(txtNota1.Text) + double.Parse(txtNota2.Text) + double.Parse(txtNota3.Text)) / 3, 0);

            mod.Notaf             = Notaf;
            pU.txtCIDOC.Text      = txtCIDoc.Text;
            pU.cbxAñoCurso.Text   = NotasConsultas.ListarAño(int.Parse(txtCIAlm.Text));
            pU.cbxGrado.Text      = NotasConsultas.ListarGrado(int.Parse(txtCIAlm.Text));
            pU.cbxMateria.Text    = NotasConsultas.ListarNombreM(int.Parse(txtCIMat.Text));
            pU.panelNotas.Visible = true;
            MessageBox.Show("Notas agregadas exitosamente");
            ModuloABML.UpdateAlumno(mod);
            pU.Show();
            this.Close();
        }