Example #1
0
        public static ChildProgress LoadSpecificChildProgressesByChildID(int progressID)
        {
            var entityProgress = new Domain.Entity.ChildProgress();
            var childProgress  = new ChildProgress();

            using (Domain.Repositories.ChildProgressRepository repo = new Domain.Repositories.ChildProgressRepository())
            {
                entityProgress = repo.LoadSpecificChildProgressesByprogressID(progressID);
            }
            childProgress = ConvertEntityToBusiness(entityProgress);
            return(childProgress);
        }
Example #2
0
        public static int Save(BLL.LearnHebrewEntities.ChildProgress childProgress)
        {
            Domain.Entity.ChildProgress childProgressEntity = new Domain.Entity.ChildProgress();
            childProgressEntity.ProgressID = childProgress.ProgressID;
            childProgressEntity.ChildID    = childProgress.ChildID;
            childProgressEntity.Data       = Serialization.Serialize2 <BLL.LearnHebrewEntities.ChildProgress.ProgressData>(childProgress.Data);

            using (var repo = new Domain.Repositories.ChildProgressRepository())
            {
                childProgress.ProgressID = repo.Save(childProgressEntity);
            }

            return(childProgress.ProgressID);
        }
Example #3
0
 public static Domain.Entity.ChildProgress ConvertBusinessToEntity(ChildProgress BProgress)
 {
     Domain.Entity.ChildProgress EProgress = new Domain.Entity.ChildProgress();
     try
     {
         EProgress.ChildID    = BProgress.ChildID;
         EProgress.ProgressID = BProgress.ProgressID;
         EProgress.Data       = Serialization.Serialize2(BProgress.Data);
         return(EProgress);
     }
     catch (Exception ex)
     {
         return(new Domain.Entity.ChildProgress());
     }
 }
Example #4
0
        public static ChildProgress ConvertEntityToBusiness(Domain.Entity.ChildProgress EProg)
        {
            ChildProgress BProg = new ChildProgress();

            try
            {
                BProg.ProgressID = EProg.ProgressID;
                BProg.ChildID    = EProg.ChildID;
                BProg.Data       = Serialization.Deserialize2 <ChildProgress.ProgressData>(EProg.Data);
                return(BProg);
            }
            catch (Exception ex)
            {
                return(new ChildProgress());
            }
        }