Example #1
0
 public static void InsertSubjectCategory(SubjectCategory subjectCategory)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         db.SubjectCategories.Add(subjectCategory);
         db.SaveChanges();
     }
 }
Example #2
0
 public static void InsertPostType(PostType postType)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         db.PostTypes.Add(postType);
         db.SaveChanges();
     }
 }
Example #3
0
 public static void InsertLogType(LogType logType)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         db.LogTypes.Add(logType);
         db.SaveChanges();
     }
 }
Example #4
0
 public static void InsertSubject(Subject subject)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         db.Subjects.Add(subject);
         db.SaveChanges();
     }
 }
Example #5
0
 public static void InsertFeedbackType(FeedbackType feedbackType)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         db.FeedbackTypes.Add(feedbackType);
         db.SaveChanges();
     }
 }
Example #6
0
 public static void InsertJobType(JobType jobType)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         db.JobTypes.Add(jobType);
         db.SaveChanges();
     }
 }
Example #7
0
 public static void InsertInstitute(Institute institute)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         db.Institutes.Add(institute);
         db.SaveChanges();
     }
 }
Example #8
0
 public static void InsertDegree(Degree degree)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         db.Degrees.Add(degree);
         db.SaveChanges();
     }
 }
Example #9
0
 public static void InsertTestLevel(TestLevel testLevel)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         db.TestLevels.Add(testLevel);
         db.SaveChanges();
     }
 }
Example #10
0
 public static void InsertArea(Area area)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         db.Areas.Add(area);
         db.SaveChanges();
     }
 }
Example #11
0
 public static void InsertTestType(TestType testType)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         db.TestTypes.Add(testType);
         db.SaveChanges();
     }
 }
Example #12
0
 public static void UpdateTestType(TestType testType)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempTesttype = db.TestTypes.Single(x => x.Id == testType.Id);
         tempTesttype.TestTypeName = testType.TestTypeName;
         db.SaveChanges();
     }
 }
Example #13
0
 public static void UpdateDegreeType(DegreeType degreeType)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempDegreetype = db.DegreeTypes.Single(x => x.Id == degreeType.Id);
         tempDegreetype.DegreeTypeName = degreeType.DegreeTypeName;
         db.SaveChanges();
     }
 }
Example #14
0
 public static void DeleteSubject(int subjectId)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempSubject = db.Subjects.Single(x => x.Id == subjectId);
         db.Subjects.Remove(tempSubject);
         db.SaveChanges();
     }
 }
Example #15
0
 public static void UpdateFeedbackType(FeedbackType feedbackType)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempFeedbacktype = db.FeedbackTypes.Single(x => x.Id == feedbackType.Id);
         tempFeedbacktype.FeedbackTypeName = feedbackType.FeedbackTypeName;
         db.SaveChanges();
     }
 }
Example #16
0
 public static void DeleteLog(int logId)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempLog = db.Logs.Single(x => x.Id == logId);
         db.Logs.Remove(tempLog);
         db.SaveChanges();
     }
 }
Example #17
0
 public static void DeletePostType(int postTypeId)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempPostType = db.PostTypes.Single(x => x.Id == postTypeId);
         db.PostTypes.Remove(tempPostType);
         db.SaveChanges();
     }
 }
Example #18
0
 public static void DeleteInstitute(int instituteId)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempInstitute = db.Institutes.Single(x => x.Id == instituteId);
         db.Institutes.Remove(tempInstitute);
         db.SaveChanges();
     }
 }
Example #19
0
 public static void DeleteFeedbackType(int feedbackTypeId)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempFeedbackType = db.FeedbackTypes.Single(x => x.Id == feedbackTypeId);
         db.FeedbackTypes.Remove(tempFeedbackType);
         db.SaveChanges();
     }
 }
Example #20
0
 public static void DeleteTestLevel(int testLevelId)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempTestLevel = db.TestLevels.Single(x => x.Id == testLevelId);
         db.TestLevels.Remove(tempTestLevel);
         db.SaveChanges();
     }
 }
Example #21
0
 public static void DeleteDegree(int degreeId)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempDegree = db.Degrees.Single(x => x.Id == degreeId);
         db.Degrees.Remove(tempDegree);
         db.SaveChanges();
     }
 }
Example #22
0
 public static void UpdateSubjectCategory(SubjectCategory subjectCategory)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempSubjectCategory = db.SubjectCategories.Single(x => x.Id == subjectCategory.Id);
         tempSubjectCategory.SubjectCategoryName = subjectCategory.SubjectCategoryName;
         db.SaveChanges();
     }
 }
Example #23
0
 public static void DeleteArea(int areaId)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempAreas = db.Areas.Single(x => x.Id == areaId);
         db.Areas.Remove(tempAreas);
         db.SaveChanges();
     }
 }
Example #24
0
 public static void UpdateLogType(LogType logType)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempLogtype = db.LogTypes.Single(x => x.Id == logType.Id);
         tempLogtype.LogTypeName = logType.LogTypeName;
         db.SaveChanges();
     }
 }
Example #25
0
 public static void UpdateJobType(JobType jobType)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempJobType = db.JobTypes.Single(x => x.Id == jobType.Id);
         tempJobType.JobTypeName = jobType.JobTypeName;
         db.SaveChanges();
     }
 }
Example #26
0
 public static void UpdateSubject(Subject subject)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempSubject = db.Subjects.Single(x => x.Id == subject.Id);
         tempSubject.SubjectName       = subject.SubjectName;
         tempSubject.SubjectCategoryId = subject.SubjectCategoryId;
         db.SaveChanges();
     }
 }
Example #27
0
        public static void UpdatePostType(PostType postType)
        {
            using (FindEducatorsContext db = new FindEducatorsContext())
            {
                var tempPostType = db.PostTypes.Single(x => x.Id == postType.Id);
                tempPostType.PostTypeName = postType.PostTypeName;

                db.SaveChanges();
            }
        }
Example #28
0
 public static void UpdateLog(Log log)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempLog = db.Logs.Single(x => x.Id == log.Id);
         tempLog.LogTypeId = log.LogTypeId;
         tempLog.LogDetail = log.LogDetail;
         db.SaveChanges();
     }
 }
Example #29
0
 public static void UpdateArea(Area area)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempArea = db.Areas.Single(x => x.Id == area.Id);
         tempArea.AreaName = area.AreaName;
         tempArea.CityId   = area.CityId;
         db.SaveChanges();
     }
 }
Example #30
0
 public static void UpdateInstitute(Institute institute)
 {
     using (FindEducatorsContext db = new FindEducatorsContext())
     {
         var tempInstitute = db.Institutes.Single(x => x.Id == institute.Id);
         tempInstitute.InstituteName = institute.InstituteName;
         tempInstitute.CityId        = institute.CityId;
         db.SaveChanges();
     }
 }