Exemple #1
0
        public DetailViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Tag tag) : base(currentFirmaSession)
        {
            Tag        = tag;
            PageTitle  = tag.TagName;
            EntityName = "Tag";

            EditTagUrl = SitkaRoute <TagController> .BuildUrlFromExpression(c => c.Edit(tag));

            ManageTagsUrl = SitkaRoute <TagController> .BuildUrlFromExpression(c => c.Index());

            UserHasTagManagePermissions = new FirmaAdminFeature().HasPermissionByFirmaSession(currentFirmaSession);

            BasicProjectInfoGridName = "tagProjectListGrid";

            BasicProjectInfoGridSpec = new BasicProjectInfoGridSpec(currentFirmaSession, true)
            {
                ObjectNameSingular  = $"{FieldDefinitionEnum.Project.ToType().GetFieldDefinitionLabel()} with this Tag",
                ObjectNamePlural    = $"{FieldDefinitionEnum.Project.ToType().GetFieldDefinitionLabelPluralized()} with this Tag",
                SaveFiltersInCookie = true
            };

            BasicProjectInfoGridDataUrl = SitkaRoute <TagController> .BuildUrlFromExpression(tc => tc.ProjectsGridJsonData(tag));
        }
Exemple #2
0
 public void UpdateModel(ProjectFirmaModels.Models.Tag tag, FirmaSession currentFirmaSession)
 {
     tag.TagName        = TagName;
     tag.TagDescription = TagDescription;
 }
Exemple #3
0
 public EditViewModel(ProjectFirmaModels.Models.Tag tag)
 {
     TagID          = tag.TagID;
     TagName        = tag.TagName;
     TagDescription = tag.TagDescription;
 }