public static Level GetLevel(LevelDO levelDO) { Level level = new Level() { ID = levelDO.ID, name = levelDO.LevelDesc }; return(level); }
public static LevelDO GetLevelDO(Level level) { LevelDO levelDO = new LevelDO() { ID = level.ID, LevelDesc = level.name }; return(levelDO); }
public int DeleteLevel(Level level) { int result = 0; try { LevelDO levelDO = Converter.GetLevelDO(level); result = levelRepository.DeleteEntity(levelDO.ID); } catch (Exception ex) { Debug.WriteLine("Exception Occured in DeleteLevel method due to " + ex.Message); } return(result); }
public static IEnumerable <LevelDO> GetMasterLevelDO(IEnumerable <Model.ServiceModel.MasterLevel> levels) { List <LevelDO> levelsDO = new List <LevelDO>(); foreach (var level in levels) { LevelDO levelDO = new LevelDO() { ID = level.LevelID, LevelDesc = level.LevelDesc, Priority = level.Priority }; levelsDO.Add(levelDO); } return(levelsDO); }
public Level GetLevel(int levelID) { Level level = new Level(); try { LevelDO levelDO = levelRepository.GetEntity(levelID); if (levelDO != null) { level = Converter.GetLevel(levelDO); } } catch (Exception ex) { Debug.WriteLine("Exception Occured in GetLevel method due to " + ex.Message); } return(level); }