Exemple #1
0
    /// <summary>
    ///
    /// </summary>
    /// <returns></returns>
    private IList <string> GetSelectedIds(string selectionKey)
    {
        List <string> ids = new List <string>();

        if (selectionKey == "selectAll")
        {
            GroupContextService groupContextService = ApplicationContext.Current.Services.Get <IGroupContextService>() as GroupContextService;
            if (groupContextService != null)
            {
                CachedGroup currentGroup = groupContextService.GetGroupContext().CurrentGroupInfo.CurrentGroup;
                ids = currentGroup.GetIdList();
            }
        }
        else
        {
            ISelectionService srv = SelectionServiceRequest.GetSelectionService();
            ISelectionContext selectionContext = srv.GetSelectionContext(selectionKey);
            ids = selectionContext.GetSelectedIds();
        }

        return(ids);
    }