示例#1
0
 public void ConvertTeacherEligibilityToTeacherEligibilityBDO(TeacherEligibility tc, TeacherEligibilityBDO telig)
 {
     telig.DateOfExam    = (DateTime)tc.DateOfExam;
     telig.Eligibility   = tc.Eligibility;
     telig.EligibilityId = tc.EligibilityId;
     telig.IssueDate     = (DateTime)tc.IssueDate;
     telig.LicenseNumber = tc.LicenseNumber;
     telig.PlaceOfExam   = tc.PlaceOfExam;
     telig.Rating        = tc.Rating;
     telig.TeacherId     = tc.TeacherId;
 }
示例#2
0
 public void ConvertTeacherEligibilityToTeacherEligibilityBDO(TeacherEligibility tc, TeacherEligibilityBDO telig)
 {
     telig.DateOfExam = (DateTime)tc.DateOfExam;
     telig.Eligibility = tc.Eligibility;
     telig.EligibilityId = tc.EligibilityId;
     telig.IssueDate = (DateTime)tc.IssueDate;
     telig.LicenseNumber = tc.LicenseNumber;
     telig.PlaceOfExam = tc.PlaceOfExam;
     telig.Rating = tc.Rating;
     telig.TeacherId = tc.TeacherId;
 }
示例#3
0
        private ICollection <TeacherEligibility> ToEligibilityList(List <TeacherEligibilityBDO> tcl)
        {
            ICollection <TeacherEligibility> teList = new List <TeacherEligibility>();

            foreach (TeacherEligibilityBDO tc in tcl)
            {
                TeacherEligibility telig = new TeacherEligibility();
                ConvertTeacherEligibilityBDOToTeacherEligibility(tc, telig);
                teList.Add(telig);
            }
            return(teList);
        }
示例#4
0
        public Boolean CreateTeacherEligibilities(List <TeacherEligibilityBDO> tcbdo, string teacherId)
        {
            Boolean ret = true;

            foreach (TeacherEligibilityBDO t in tcbdo)
            {
                TeacherEligibility te = new TeacherEligibility();
                ConvertTeacherEligibilityBDOToTeacherEligibility(t, te, teacherId);
                using (var DCEnt = new DCFIEntities())
                {
                    DCEnt.TeacherEligibilities.Attach(te);
                    int num = DCEnt.SaveChanges();
                    if (num != 1)
                    {
                        ret = false;
                    }
                }
            }
            return(ret);
        }
示例#5
0
 public Boolean CreateTeacherEligibilities(List<TeacherEligibilityBDO> tcbdo, string teacherId)
 {
     Boolean ret = true;
     try {
     foreach (TeacherEligibilityBDO t in tcbdo)
     {
         TeacherEligibility te = new TeacherEligibility();
         ConvertTeacherEligibilityBDOToTeacherEligibility(t, te, teacherId);
         using (var DCEnt = new DCFIEntities())
         {
             DCEnt.TeacherEligibilities.Attach(te);
             int num = DCEnt.SaveChanges();
             if (num != 1)
                 ret = false;
         }
     }
     }
     catch (DbEntityValidationException dbEx)
     {
         foreach (var validationErrors in dbEx.EntityValidationErrors)
         {
             foreach (var validationError in validationErrors.ValidationErrors)
             {
                 Trace.TraceInformation("Property: {0} Error: {1}",
                                         validationError.PropertyName,
                                         validationError.ErrorMessage);
             }
         }
     }
     return ret;
 }
示例#6
0
 private ICollection<TeacherEligibility> ToEligibilityList(List<TeacherEligibilityBDO> tcl)
 {
     ICollection<TeacherEligibility> teList = new List<TeacherEligibility>();
     foreach (TeacherEligibilityBDO tc in tcl)
     {
         TeacherEligibility telig = new TeacherEligibility();
         ConvertTeacherEligibilityBDOToTeacherEligibility(tc, telig);
         teList.Add(telig);
     }
     return teList;
 }
示例#7
0
 private void ConvertTeacherEligibilityBDOToTeacherEligibility(TeacherEligibilityBDO tc, TeacherEligibility telig)
 {
     telig.DateOfExam = tc.DateOfExam;
     telig.Eligibility = tc.Eligibility;
     telig.EligibilityId = tc.EligibilityId;
     telig.IssueDate = tc.IssueDate;
     telig.LicenseNumber = tc.LicenseNumber;
     telig.PlaceOfExam = tc.PlaceOfExam;
     telig.Rating = tc.Rating;
     telig.TeacherId = tc.TeacherId;
 }
示例#8
0
 public Boolean CreateTeacherEligibilities(List<TeacherEligibilityBDO> tcbdo, string teacherId)
 {
     Boolean ret = true;
     foreach (TeacherEligibilityBDO t in tcbdo)
     {
         TeacherEligibility te = new TeacherEligibility();
         ConvertTeacherEligibilityBDOToTeacherEligibility(t, te, teacherId);
         using (var DCEnt = new DCFIEntities())
         {
             DCEnt.TeacherEligibilities.Attach(te);
             int num = DCEnt.SaveChanges();
             if (num != 1)
                 ret = false;
         }
     }
     return ret;
 }
示例#9
0
 private void ConvertTeacherEligibilityBDOToTeacherEligibility(TeacherEligibilityBDO tc, TeacherEligibility telig)
 {
     telig.DateOfExam    = tc.DateOfExam;
     telig.Eligibility   = tc.Eligibility;
     telig.EligibilityId = tc.EligibilityId;
     telig.IssueDate     = tc.IssueDate;
     telig.LicenseNumber = tc.LicenseNumber;
     telig.PlaceOfExam   = tc.PlaceOfExam;
     telig.Rating        = tc.Rating;
     telig.TeacherId     = tc.TeacherId;
 }