Example #1
0
        public async Task <IActionResult> PutNotas(int id, TNotas notas)
        {
            if (id != notas.Id)
            {
                return(BadRequest());
            }

            _context.Entry(notas).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!NotasExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Example #2
0
        public async Task <ActionResult <TNotas> > PostNotas(TNotas notas)
        {
            _context.notas.Add(notas);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetNotas", new { id = notas.Id }, notas));
        }
Example #3
0
 protected void OnAgregar1Clicked(object sender, EventArgs e)
 {
     TNotas Nt = new TNotas ();
     Llenar (Nt);
     Agregar (Nt);
     Ln.Agregar (Nt);
     Limpiar ();
 }
 private TNotas Crear()
 {
     TNotas Nt = null;
     switch (CB1.Active) {
     case 0:
         Nt = new TNotas ();
         break;
     case 1:
         Nt = new TDef1 ();
         break;
     case 2:
         Nt = new TDef2 ();
         break;
     case 3:
         Nt = new TDef3 ();
         break;
     }
     return Nt;
 }
 private void Llenar(TNotas Nt)
 {
     Nt.Nota1 = float.Parse (E1.Text);
     Nt.Nota2 = float.Parse (E2.Text);
     Nt.Nota3 = float.Parse (E3.Text.Replace('.',','));
 }
Example #6
0
 public void Agregar(TNotas Nt)
 {
     LN.Add (Nt);
 }
Example #7
0
 private void Agregar(TNotas Nt)
 {
     Mod.AppendValues (Nt.Asignatura,Nt.Nota1,Nt.Nota2,Nt.Nota3,Nt.Definitiva());
 }
Example #8
0
 private void Llenar(TNotas Nt)
 {
     Nt.Asignatura = E1.Text;
     Nt.Nota1 = float.Parse (E2.Text);
     Nt.Nota2 = float.Parse (E3.Text);
     Nt.Nota3 = float.Parse (E4.Text);
 }