public LandingPageData getLandingPageItems(LandingPageData.Request Request) { LandingPageData Items = new LandingPageData(); DataTable LandingPageTable = _getLandingPageTable(Request.RoleId, Request.ActionId); foreach (DataRow LandingPageRow in LandingPageTable.Rows) { CswNbtLandingPageItem Item = CswNbtLandingPageItemFactory.makeLandingPageItem(_CswNbtResources, LandingPageRow["componenttype"].ToString()); Item.setItemDataForUI(LandingPageRow, Request); if (false == String.IsNullOrEmpty(Item.ItemData.LandingPageId)) { Items.LandingPageItems.Add(Item.ItemData); } } return(Items); }
/// <summary> /// Grabs a LandingPage Item with the given Name for the given RoleId and/or Action Id /// </summary> /// <param name="Name">Label Text of the LandingPage Item to grab</param> /// <param name="ActionId">Action ID (for Action-specific Landing Pages)</param> /// <param name="RoleId">RoleId (for Welcome Page)</param> /// <returns></returns> public LandingPageData.LandingPageItem getLandingPageItem(String Name, Int32 ActionId, CswPrimaryKey RoleId) { LandingPageData.LandingPageItem LandingPageItem = null; LandingPageData Items = _LandingPageTable.getLandingPageItems(new LandingPageData.Request { ActionId = ActionId.ToString(), RoleId = RoleId.ToString() }); foreach (LandingPageData.LandingPageItem Item in Items.LandingPageItems) { if (Item.Text == Name) { LandingPageItem = Item; } } return(LandingPageItem); }