Exemplo n.º 1
0
 public Register(Models.Register item, string baseUrl, string selectedDOKMunicipality = null, string cultureName = Culture.NorwegianCode)
 {
     if (item != null)
     {
         id                 = baseUrl + item.GetObjectUrl();
         label              = item.NameTranslated();
         lang               = cultureName;
         contentsummary     = item.DescriptionTranslated();
         lastUpdated        = item.modified;
         status             = item.status.DescriptionTranslated();
         targetNamespace    = item.targetNamespace;
         containedItemClass = item.containedItemClass;
         if (item.owner != null)
         {
             owner = item.owner.NameTranslated();
         }
         if (item.manager != null)
         {
             manager = item.manager.name;
         }
         containeditems          = new List <Registeritem>();
         containedSubRegisters   = new List <Register>();
         SelectedDOKMunicipality = selectedDOKMunicipality;
         uuid = item.systemId;
     }
 }