public ModuleGenericTemplateMessages(ModuleTemplateMessages m)
 {
     uniqueCode             = ModuleTemplateMessages.UniqueCode;
     List                   = m.List;
     Add                    = m.Add;
     Edit                   = m.Edit;
     Clone                  = m.Clone;
     DeleteOtherTemplates   = m.DeleteOtherTemplates;
     Administration         = m.Administration;
     ManageModulePermission = m.ManageModulePermission;
 }
        public static ModuleTemplateMessages CreatePortalmodule(int idProfileType, lm.Comol.Core.TemplateMessages.Domain.OwnerType type)
        {
            Boolean baseAdmin             = (idProfileType == (int)UserTypeStandard.SysAdmin || idProfileType == (int)UserTypeStandard.Administrator || idProfileType == (int)UserTypeStandard.Administrative);
            Boolean basePermission        = (idProfileType != (int)UserTypeStandard.TypingOffice || idProfileType != (int)UserTypeStandard.Guest);
            ModuleTemplateMessages module = new ModuleTemplateMessages();

            module.List                   = basePermission; // (basePermission && type == Domain.OwnerType.Person) || (baseAdmin);
            module.Add                    = (basePermission && type == Domain.OwnerType.Person) || (baseAdmin);
            module.Administration         = (basePermission && type == Domain.OwnerType.Person) || (baseAdmin);
            module.Edit                   = (basePermission && type == Domain.OwnerType.Person) || (baseAdmin);
            module.Clone                  = (basePermission && type == Domain.OwnerType.Person) || (baseAdmin);
            module.DeleteMyTemplates      = (basePermission && type == Domain.OwnerType.Person) || (baseAdmin);
            module.DeleteOtherTemplates   = baseAdmin;
            module.ManageModulePermission = (idProfileType == (int)UserTypeStandard.SysAdmin || idProfileType == (int)UserTypeStandard.Administrator);
            return(module);
        }