Example #1
0
        private void FixupStudent(Student previousValue)
        {
            if (previousValue != null && previousValue.Employment_VisitLog.Contains(this))
            {
                previousValue.Employment_VisitLog.Remove(this);
            }

            if (Student != null)
            {
                if (!Student.Employment_VisitLog.Contains(this))
                {
                    Student.Employment_VisitLog.Add(this);
                }
                if (StudentId != Student.Id)
                {
                    StudentId = Student.Id;
                }
            }
        }
Example #2
0
 public void Delete(Student entity)
 {
     this.DbContext.Students.DeleteObject(entity);
 }
Example #3
0
 public void Update(Student entity)
 {
     var e = this.FindById(entity.Id);
     if (e != null) {
         e.Name = entity.Name;
         e.PinYin = entity.PinYin;
         e.Gender = entity.Gender;
         e.Birthday = entity.Birthday;
         e.EduLevel = entity.EduLevel;
         e.GraduateDate = entity.GraduateDate;
         e.Score = entity.Score;
         e.GruduateSchoolId = entity.GruduateSchoolId;
         e.Profession = entity.Profession;
         e.IdCardNo = entity.IdCardNo;
         e.HuKouType = entity.HuKouType;
         e.Address = entity.Address;
         e.Postcode = entity.Postcode;
         e.FeeSource = entity.FeeSource;
         e.SmallInfoSourceId = entity.SmallInfoSourceId;
         e.QQ = entity.QQ;
         e.Email = entity.Email;
         e.Mobile = entity.Mobile;
         e.HomeTelephone = entity.HomeTelephone;
         e.OfficeTelephone = entity.OfficeTelephone;
         e.MemberRelType1 = entity.MemberRelType1;
         e.MemberName1 = entity.MemberName1;
         e.MemberCompany1 = entity.MemberCompany1;
         e.MemberPosition1 = entity.MemberPosition1;
         e.MemberMobile1 = entity.MemberMobile1;
         e.MemberRelType2 = entity.MemberRelType2;
         e.MemberName2 = entity.MemberName2;
         e.MemberCompany2 = entity.MemberCompany2;
         e.MemberPosition2 = entity.MemberPosition2;
         e.MemberMobile2 = entity.MemberMobile2;
         e.MemberRelType3 = entity.MemberRelType3;
         e.MemberName3 = entity.MemberName3;
         e.MemberCompany3 = entity.MemberCompany3;
         e.MemberPosition3 = entity.MemberPosition3;
         e.MemberMobile3 = entity.MemberMobile3;
         e.MemberRelType4 = entity.MemberRelType4;
         e.MemberName4 = entity.MemberName4;
         e.MemberCompany4 = entity.MemberCompany4;
         e.MemberPosition4 = entity.MemberPosition4;
         e.MemberMobile4 = entity.MemberMobile4;
         e.WorkState = entity.WorkState;
         e.StudyDuration1 = entity.StudyDuration1;
         e.StudySchool1 = entity.StudySchool1;
         e.StudyPosition1 = entity.StudyPosition1;
         e.StudyDuration2 = entity.StudyDuration2;
         e.StudySchool2 = entity.StudySchool2;
         e.StudyPosition2 = entity.StudyPosition2;
         e.StudyDuration3 = entity.StudyDuration3;
         e.StudySchool3 = entity.StudySchool3;
         e.StudyPosition3 = entity.StudyPosition3;
         e.SoftwareExp = entity.SoftwareExp;
         e.ProgramExp = entity.ProgramExp;
         e.NetworkExp = entity.NetworkExp;
         e.RelCourse = entity.RelCourse;
         e.DistrictId = entity.DistrictId;
         e.IntentCity = entity.IntentCity;
         e.ClazzId = entity.ClazzId;
         e.StudentNo = entity.StudentNo;
         e.InSchoolDate = entity.InSchoolDate;
         e.IsDorm = entity.IsDorm;
         e.DormNo = entity.DormNo;
         e.GiveCourseware = entity.GiveCourseware;
         e.Consultants = entity.Consultants;
         e.Remark = entity.Remark;
         e.CreateTime = entity.CreateTime;
         e.LastUpdateTime = entity.LastUpdateTime;
         e.IsGetQualification = entity.IsGetQualification;
         e.Status = entity.Status;
         e.TechnicalWay = entity.TechnicalWay;
         e.NeedObtainWork = entity.NeedObtainWork;
         e.IntentPosition = entity.IntentPosition;
         e.TargetSalary = entity.TargetSalary;
         e.InsuranceStartDate = entity.InsuranceStartDate;
         e.InsuranceEndDate = entity.InsuranceEndDate;
         e.GaoKaoBatch = entity.GaoKaoBatch;
         e.GiveNotebook = entity.GiveNotebook;
         e.MaxSalary = entity.MaxSalary;
         e.CurrentSalary = entity.CurrentSalary;
         e.FirstSalary = entity.FirstSalary;
         e.BeginSchoolTime = entity.BeginSchoolTime;
         e.MasterName1 = entity.MasterName1;
         e.MasterName2 = entity.MasterName2;
         e.MasterName3 = entity.MasterName3;
         e.TeacherName1 = entity.TeacherName1;
         e.TeacherName2 = entity.TeacherName2;
         e.TeacherName3 = entity.TeacherName3;
         e.MasterId1 = entity.MasterId1;
         e.MasterId2 = entity.MasterId2;
         e.MasterId3 = entity.MasterId3;
         e.TeacherId1 = entity.TeacherId1;
         e.TeacherId2 = entity.TeacherId2;
         e.TeacherId3 = entity.TeacherId3;
         e.QualificationSchool = entity.QualificationSchool;
         e.InsuranceStatus = entity.InsuranceStatus;
         e.OldOaId = entity.OldOaId;
         e.OldOaInfoSourceSubTypeName = entity.OldOaInfoSourceSubTypeName;
         e.OldOaClass = entity.OldOaClass;
         e.HasRelTeacher = entity.HasRelTeacher;
         e.RelTeacher = entity.RelTeacher;
         e.HomeIntro = entity.HomeIntro;
         e.Give1 = entity.Give1;
         e.Give2 = entity.Give2;
         e.Give3 = entity.Give3;
         e.Receive1 = entity.Receive1;
         e.Receive2 = entity.Receive2;
         e.Receive3 = entity.Receive3;
         e.Receive4 = entity.Receive4;
         e.Receive5 = entity.Receive5;
         e.Receive6 = entity.Receive6;
         e.Pic1 = entity.Pic1;
         e.Pic2 = entity.Pic2;
         e.Pic3 = entity.Pic3;
         e.Pic4 = entity.Pic4;
         e.Pic5 = entity.Pic5;
         e.Pic6 = entity.Pic6;
     }
     //if (this.FindById(entity.Id) != null) {
     //	this.DbContext.Students.Attach(entity);
     //	this.DbContext.ObjectStateManager.ChangeObjectState(entity, System.Data.EntityState.Modified);
     //}
 }
Example #4
0
 public void Add(Student entity)
 {
     this.DbContext.Students.AddObject(entity);
 }
Example #5
0
 public void Delete(Student entity)
 {
     this.Repository.Delete(entity);
     this.Db.Save();
 }
Example #6
0
 public void Add(Student entity)
 {
     this.Repository.Add(entity);
     this.Db.Save();
 }
Example #7
0
 public void Update(Student entity)
 {
     this.Repository.Update(entity);
     this.Db.Save();
 }
Example #8
0
 public void Save(Student entity)
 {
     if(entity.Id==0){
         this.Add(entity);
     }else{
         this.Db.Save();
     }
 }