public void EditLevelType(Rules_LvlType LevelType) { Rules_LvlType EditedLevelType = GetLevelType(LevelType.ID); EditedLevelType.Cost = LevelType.Cost; EditedLevelType.Description = LevelType.Description; this.SaveChanges(); }
public Rules_LvlType GetNewLevelTypeBase() { Rules_LvlType NewLevelType = new Rules_LvlType() { ID = GetNewLevelTypeID(), Description = "", Cost = 0 }; return(NewLevelType); }
public void DeleteLevelType(int ID) { Rules_LvlType SelectedLevelType = GetLevelType(ID); IList <Rules_Skills_List> SkillsList = GetSkillsByType(SelectedLevelType.ID); foreach (var Skill in SkillsList) { Skill.SkillTypeID = -1; } _DataContext.Rules_LvlType.Remove(SelectedLevelType); this.SaveChanges(); }
public void AddLevelType(Rules_LvlType LevelType) { _DataContext.Rules_LvlType.Add(LevelType); this.SaveChanges(); }