コード例 #1
0
ファイル: StudentService.cs プロジェクト: LeiWuLong/SVM_Suite
        public tblstudenteducationalbackground GetEducLevelUpdate(int levelId)
        {
            tblstudenteducationalbackground studentEducationLevel = (from p in svmContext.tblstudenteducationalbackground
                                                                     where p.IsDeleted == false && p.LevelId == levelId
                                                                     select p).FirstOrDefault();

            return(studentEducationLevel);
        }
コード例 #2
0
ファイル: StudentService.cs プロジェクト: LeiWuLong/SVM_Suite
        public void UpdateEducationalBackground(int educId, int levelId, string schoolName, string schoolYear, string awardsReceived)
        {
            tblstudenteducationalbackground tblStudentEducationalBackground = GetEducLevelUpdate(educId);

            tblStudentEducationalBackground.LevelId        = tblStudentEducationalBackground.LevelId;
            tblStudentEducationalBackground.SchoolName     = schoolName;
            tblStudentEducationalBackground.SchoolYear     = schoolYear;
            tblStudentEducationalBackground.AwardsReceived = awardsReceived;

            svmContext.tblstudenteducationalbackground.Add(tblStudentEducationalBackground);
            svmContext.SaveChanges();
            //svmContext.tblstuden.Add(tblStudentEducationalBackground);
        }
コード例 #3
0
ファイル: StudentService.cs プロジェクト: LeiWuLong/SVM_Suite
        public void SaveEducationalBackground(int levelId, string schoolName, string schoolYear, string awardsReceived, int studentId)
        {
            tblstudenteducationalbackground tblStudentEducationalBackground = new tblstudenteducationalbackground();

            tblStudentEducationalBackground.EducLevelId    = levelId;
            tblStudentEducationalBackground.SchoolName     = schoolName;
            tblStudentEducationalBackground.SchoolYear     = schoolYear;
            tblStudentEducationalBackground.AwardsReceived = awardsReceived;
            tblStudentEducationalBackground.StudentId      = studentId;
            svmContext.tblstudenteducationalbackground.Add(tblStudentEducationalBackground);
            svmContext.SaveChanges();
            //svmContext.tblstuden.Add(tblStudentEducationalBackground);
        }