public static void AddEvaluationLevel(Domain.Evaluation dto)
        {
            DeleteEvaluationLevels(dto.ID);

            using (EvaluationDBDataContext db = new EvaluationDBDataContext())
            {
                foreach (Domain.Level level in dto.CurrentLevels)
                {
                    if (level.LevelNumber != 0)
                    {
                        EvaluationLevel eLevel = new EvaluationLevel
                        {
                            EvaluationID = dto.ID,
                            LevelID = level.ID,
                            DimensionID = level.DimensionID,
                            DateCreated = DateTime.Now,
                            DateModified = DateTime.Now
                        };

                        db.EvaluationLevels.InsertOnSubmit(eLevel);
                        db.SubmitChanges();
                    }
                }
            }
        }
        public static void AddUpdateEvaluationLevel(int evaluationID, int dimensionID, int levelID)
        {
            DeleteEvaluationLevel(evaluationID, dimensionID);

            using (EvaluationDBDataContext db = new EvaluationDBDataContext())
            {
                EvaluationLevel eLevel = new EvaluationLevel
                {
                    EvaluationID = evaluationID,
                    LevelID = levelID,
                    DimensionID = dimensionID,
                    DateCreated = DateTime.Now,
                    DateModified = DateTime.Now
                };

                db.EvaluationLevels.InsertOnSubmit(eLevel);
                db.SubmitChanges();
            }
        }
 partial void DeleteEvaluationLevel(EvaluationLevel instance);
 partial void UpdateEvaluationLevel(EvaluationLevel instance);
 partial void InsertEvaluationLevel(EvaluationLevel instance);
		private void detach_EvaluationLevels(EvaluationLevel entity)
		{
			this.SendPropertyChanging();
			entity.Evaluation = null;
		}
		private void attach_EvaluationLevels(EvaluationLevel entity)
		{
			this.SendPropertyChanging();
			entity.Level = this;
		}