private void SetTitleBar() { string text = GetResource("PageTitle"); this.Title = Resources.Portal.PortalTitle + " - " + text; IEntityContextService entityContext = this.PageWorkItem.Services.Get <IEntityContextService>(); if (entityContext.HasEntityContext) { switch (this.ViewMode) { case EntityViewMode.Detail: text = string.Format("{0} - {1}", Type.GetType(EntityTypeName).GetDisplayName(), entityContext.GetEntity()); break; case EntityViewMode.List: text = Type.GetType(EntityTypeName).GetPluralDisplayName(); break; default: break; } } if (string.IsNullOrEmpty(text)) { text = Resources.Portal.PortalTitle; } if (String.IsNullOrEmpty(this.TitleBar.Text)) { TitleBar.Text = Server.HtmlEncode(text); } if (String.IsNullOrEmpty(this.TitleBar.Image)) { TitleBar.Image = ImageClass; } }
public void InitEntityContext([ServiceDependency]WorkItem parentWorkItem) { _workItem = parentWorkItem; m_EntityContextService = _workItem.Services.Get<IEntityContextService>(); }
public void InitEntityContext([ServiceDependency] WorkItem parentWorkItem) { _workItem = parentWorkItem; m_EntityContextService = _workItem.Services.Get <IEntityContextService>(); }