Exemplo n.º 1
0
        internal static EntityCollection <BibDSModel.PreservationJournaling> Convert(this BindingList <PreservationJournaling> jou, BibDSModel.BiblosDS2010Entities db, EntityCollection <BibDSModel.PreservationJournaling> original = null, int level = 0, int deeplevel = 5)
        {
            if (jou == null || level > deeplevel)
            {
                return(null);
            }

            var retval = (original == null) ? new EntityCollection <BibDSModel.PreservationJournaling>() : original;

            BibDSModel.PreservationJournaling journal = null;

            foreach (var entity in jou)
            {
                if (original != null)
                {
                    journal = original
                              .Where(x => x.IdPreservationJournaling == entity.IdPreservationJournaling)
                              .SingleOrDefault();
                }

                retval.Add(entity.Convert(db, journal, level + 1, deeplevel));
            }

            return(retval);
        }
Exemplo n.º 2
0
        internal static PreservationJournaling Convert(this BibDSModel.PreservationJournaling jou, int level = 0, int deeplevel = 5)
        {
            if (jou == null || level > deeplevel)
            {
                return(null);
            }

            return(new PreservationJournaling
            {
                DateActivity = jou.DateActivity,
                DateCreated = jou.DateCreated,
                DomainUser = jou.DomainUser,
                User = jou.PreservationUser.Convert(level + 1, deeplevel),
                IdPreservation = jou.IdPreservation,
                IdPreservationJournaling = jou.IdPreservationJournaling,
                IdPreservationJournalingActivity = jou.IdPreservationJournalingActivity,
                Preservation = jou.Preservation.Convert(level + 1, deeplevel),
                PreservationJournalingActivity = jou.PreservationJournalingActivity.Convert(level + 1, deeplevel),
                Notes = jou.Notes,
            });
        }
Exemplo n.º 3
0
        internal static BibDSModel.PreservationJournaling Convert(this PreservationJournaling jou, BibDSModel.BiblosDS2010Entities db, BibDSModel.PreservationJournaling original = null, int level = 0, int deeplevel = 5)
        {
            if (jou == null || level > deeplevel)
            {
                return(null);
            }

            var retval = (original == null) ? new BibDSModel.PreservationJournaling() : original;

            retval.IdPreservationJournaling         = jou.IdPreservationJournaling;
            retval.IdPreservation                   = jou.IdPreservation;
            retval.IdPreservationJournalingActivity = jou.IdPreservationJournalingActivity;
            retval.IdPreservationUser               = jou.User.IdPreservationUser;
            retval.Notes        = jou.Notes;
            retval.DomainUser   = jou.DomainUser;
            retval.DateActivity = jou.DateActivity;
            retval.DateCreated  = jou.DateCreated;

            return(retval);
        }