Exemple #1
0
 public ActionResult Editar(int id)
 {
     try
     {
         using (var db = new inventoryContext())
         {
             degrees deg = db.degrees.Find(id);
             return(View(deg));
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Exemple #2
0
 public ActionResult Eliminar(int id)
 {
     try
     {
         using (var db = new inventoryContext())
         {
             //para actualizar primero encuentro al alumno
             degrees deg = db.degrees.Find(id); //al es el alumno encontrado
             db.degrees.Remove(deg);
             db.SaveChanges();
             return(RedirectToAction("Index2"));
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Exemple #3
0
 public ActionResult Editar(degrees a)
 {
     try
     {
         if (!ModelState.IsValid) // o sea si los datos estan bien, si numero es numero y asi
         {
             return(View());      //si el modelo es validor retona la vista
         }
         using (var db = new inventoryContext())
         {
             //para actualizar primero encuentro al alumno
             degrees deg = db.degrees.Find(a.id); //al es el alumno encontrado
             deg.degrees1 = a.degrees1;
             //agregar ultima actualizacion
             db.SaveChanges();
             return(RedirectToAction("Index2"));
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Exemple #4
0
        public ActionResult Agregar(degrees a)
        {
            if (!ModelState.IsValid)
            {
                return(View());
            }

            try
            {
                using (var db = new inventoryContext())
                {
                    db.degrees.Add(a);
                    db.SaveChanges();
                    return(RedirectToAction("Index2"));
                }
            }

            catch (Exception ex)
            {
                ModelState.AddModelError("", "Error");
                return(View());
            }
        }
Exemple #5
0
 _SetPunctualLight(idx, PBRPunctualLight.Directional(degrees, color.ToVector3(), intensity));
Exemple #6
0
 return(new vec2(degrees(radians.x), degrees(radians.y)));