Exemple #1
0
 public ClassificationLevel GetClassificationlevelById(int ClassificationLevelId)
 {
     try
     {
         ClassificationLevel classificationLevel = db.ClassificationLevel.Find(ClassificationLevelId);
         return(classificationLevel);
     }
     catch
     {
         throw;
     }
 }
Exemple #2
0
 public int AddClassificationLevel(ClassificationLevel classificationLevel)
 {
     try
     {
         db.ClassificationLevel.Add(classificationLevel);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
Exemple #3
0
 //to delete ClassificationLevel
 public int DeleteClassificationLevel(int classificationLevelId)
 {
     try
     {
         ClassificationLevel classificationlevel = db.ClassificationLevel.Find(classificationLevelId);
         db.ClassificationLevel.Remove(classificationlevel);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
Exemple #4
0
        public int UpdateClassificationLevel(ClassificationLevel classificationLevel)
        {
            try
            {
                db.Entry(classificationLevel).State = EntityState.Modified;
                db.SaveChanges();

                return(1);
            }
            catch
            {
                throw;
            }
        }