Exemplo n.º 1
0
        private void dgnotasV_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Enable(true);
            notasvalores = new NotasValores();
            notasvalores = dgnotasV.SelectedItem as NotasValores;
            if (notasvalores != null)
            {
                cb1TV.Text = notasvalores.Primer_Trimestre;
                cb2TV.Text = notasvalores.Segundo_Trimestre;
                cb3TV.Text = notasvalores.Tercer_Trimestre;

                cbValores.SelectedValue = notasvalores.ValoresId;
            }
        }
Exemplo n.º 2
0
        // FINALIZA LA PROGRAMACION DE NOTAS
        //INICIA LA PROGMACION DE NOTAS VALORES
        private void btnGuardarnotasvalores_Click(object sender, RoutedEventArgs e)
        {
            if (cb1TV.Text != "")
            {
                NotasValores _valor = new NotasValores();
                _valor.Primer_Trimestre  = cb1TV.Text;
                _valor.Segundo_Trimestre = cb2TV.Text;
                _valor.Tercer_Trimestre  = cb3TV.Text;
                _valor.MatriculaId       = id;
                _valor.ValoresId         = Convert.ToInt64(cbValores.SelectedValue);
                notasvaloresBL.Create(_valor);
                UpdateGrid();

                Enable(false);
            }
            else
            {
                MessageBox.Show("Los campos son obligatorios", "Guardar", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Exemplo n.º 3
0
 public void Delete(NotasValores pnotasValores)
 {
     uow.NotasValoresRepository.Delete(pnotasValores);
     uow.SaveChanges();
 }