public ActionResult AddNewMainLevel(MainLevel mainLevel) { var context = new RiskSystemEntities(); context.MainLevels.Add(mainLevel); context.SaveChanges(); return RedirectToAction("MainLevels"); }
public ActionResult AddNewElement(Element element) { var context = new RiskSystemEntities(); context.Elements.Add(element); context.SaveChanges(); return RedirectToAction("Elements"); }
public ActionResult AddNewDamage(Damage damage) { var context = new RiskSystemEntities(); context.Damages.Add(damage); context.SaveChanges(); return RedirectToAction("Damages"); }
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"); }
public ActionResult AddNewSubLevel(SubLevel subLevel) { var context = new RiskSystemEntities(); context.SubLevels.Add(subLevel); context.SaveChanges(); return RedirectToAction("SubLevels"); }