コード例 #1
0
        public void EditLevelType(Rules_LvlType LevelType)
        {
            Rules_LvlType EditedLevelType = GetLevelType(LevelType.ID);

            EditedLevelType.Cost        = LevelType.Cost;
            EditedLevelType.Description = LevelType.Description;
            this.SaveChanges();
        }
コード例 #2
0
        public Rules_LvlType GetNewLevelTypeBase()
        {
            Rules_LvlType NewLevelType = new Rules_LvlType()
            {
                ID          = GetNewLevelTypeID(),
                Description = "",
                Cost        = 0
            };

            return(NewLevelType);
        }
コード例 #3
0
        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();
        }
コード例 #4
0
 public void AddLevelType(Rules_LvlType LevelType)
 {
     _DataContext.Rules_LvlType.Add(LevelType);
     this.SaveChanges();
 }