Пример #1
0
 public ActionResult AddNewMainLevel(MainLevel mainLevel)
 {
     var context = new RiskSystemEntities();
     context.MainLevels.Add(mainLevel);
     context.SaveChanges();
     return RedirectToAction("MainLevels");
 }
Пример #2
0
 public ActionResult AddNewElement(Element element)
 {
     var context = new RiskSystemEntities();
     context.Elements.Add(element);
     context.SaveChanges();
     return RedirectToAction("Elements");
 }
Пример #3
0
 public ActionResult AddNewDamage(Damage damage)
 {
     var context = new RiskSystemEntities();
     context.Damages.Add(damage);
     context.SaveChanges();
     return RedirectToAction("Damages");
 }
Пример #4
0
 public ActionResult AddNewDamagePlace(/*DamagePlace damagePlace*/int? LevelId, int? SubLevelId, int? ElementId, int DamageLevel, int DamageId)
 {
     var context = new RiskSystemEntities();
     DamagePlace damagePlace=new DamagePlace();
     damagePlace.LevelId = LevelId;
     damagePlace.SubLevelId = SubLevelId;
     damagePlace.ElementId = ElementId;
     damagePlace.DamageId = DamageId;
     context.DamagePlaces.Add(damagePlace);
     context.SaveChanges();
     return RedirectToAction("DamagePlaces");
 }
Пример #5
0
 public ActionResult AddNewSubLevel(SubLevel subLevel)
 {
     var context = new RiskSystemEntities();
     context.SubLevels.Add(subLevel);
     context.SaveChanges();
     return RedirectToAction("SubLevels");
 }