Example #1
0
 public DTO_GlossaryDisplayOrder(GlossaryDisplayOrder source)
 {
     Id                    = source.Id;
     IdCommunity           = source.IdCommunity;
     DisplayOrder          = source.DisplayOrder;
     IdGlossary            = source.Glossary.Id;
     Glossary              = new DTO_Glossary(source.Glossary);
     Permission            = new GlossaryPermission();
     Permission.AddTerm    = true;
     Permission.EditTerm   = true;
     Permission.DeleteTerm = true;
 }
Example #2
0
        public DTO_Glossary(GlossaryDisplayOrder glossaryDisplayOrder, Share share)
            : this()
        {
            var glossary = glossaryDisplayOrder.Glossary;

            Id = glossary.Id;
            //IdShare = share.Id;
            if (share != null)
            {
                GlossaryShare = new DTO_Share(share);
            }
            Name        = glossary.Name;
            Description = glossary.Description;

            TermsArePaged = glossary.TermsArePaged;
            TermsPerPage  = glossary.TermsPerPage;
            TermsCount    = glossary.TermsCount;

            //IsDefault = glossary.IsDefault;
            IsPublic    = glossary.IsPublic;
            IsShared    = glossary.IsShared;
            IsPublished = glossary.IsPublished;

            IdCommunity = glossary.IdCommunity;
            IdLanguage  = glossary.IdLanguage;

            DisplayOrder = glossaryDisplayOrder.DisplayOrder;
            IdShare      = glossaryDisplayOrder.Id;

            IsDefault = glossaryDisplayOrder.IsDefault;
            if (IsDefault)
            {
                DisplayOrder = -1;
            }
            if (glossary.ModifiedOn.HasValue)
            {
                LastUpdate = glossary.ModifiedOn.Value;
            }
            else if (glossary.CreatedOn.HasValue)
            {
                LastUpdate = glossary.CreatedOn.Value;
            }
            else
            {
                LastUpdate = DateTime.MinValue;
            }
        }