示例#1
0
 private void Listar()
 {
     try
     {
         DgvListado.DataSource = NCalificaciones.buscarCalificaciones(Convert.ToInt32(CboSemestre2.SelectedValue), Convert.ToInt32(CboCurso.SelectedValue), Convert.ToInt32(CboSeccion.SelectedValue), Convert.ToInt32(CboAsignatura.SelectedValue));
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + ex.StackTrace);
     }
 }
示例#2
0
        private void BtnGuardar_Click(object sender, EventArgs e)
        {
            try
            {
                string Rpta = "";

                foreach (DataGridViewRow row in DgvListado.Rows)
                {
                    int    ide = Convert.ToInt32(this.DgvListado.CurrentRow.Cells[1].Value.ToString());
                    int    ida = Convert.ToInt32(this.DgvListado.CurrentRow.Cells[2].Value.ToString());
                    double n1  = Convert.ToDouble(this.DgvListado.CurrentRow.Cells[4].Value.ToString());
                    double n2  = Convert.ToDouble(this.DgvListado.CurrentRow.Cells[5].Value.ToString());
                    double n3  = Convert.ToDouble(this.DgvListado.CurrentRow.Cells[6].Value.ToString());
                    double n4  = Convert.ToDouble(this.DgvListado.CurrentRow.Cells[7].Value.ToString());
                    double n5  = Convert.ToDouble(this.DgvListado.CurrentRow.Cells[8].Value.ToString());

                    Rpta = NCalificaciones.Actualizar(n1, n2, n3, n4, n5, ide, ida);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }