Beispiel #1
0
        public SPListItemCollection GetRecordsInFolder(String folderPath)
        {
            WBColumn sortColumn = WBColumn.GetKnownColumnByInternalName(ViewState["SortColumn"].WBxToString());

            WBQuery workBoxQuery = new WBQuery();

            workBoxQuery.FilterByFolderPath = folderPath;

            if (sortColumn != null)
            {
                bool ascending = true;
                if (ViewState["SortDirection"].WBxToString() == "Descending")
                {
                    ascending = false;
                }

                workBoxQuery.OrderBy(sortColumn, ascending);
            }

            workBoxQuery.RecursiveAll = true;

            SPList list = manager.Libraries.ProtectedMasterLibrary.List;

            return(list.WBxGetItems(manager.Libraries.ProtectedMasterLibrary.Site, workBoxQuery));
        }
Beispiel #2
0
        protected void ShowResults_Sorting(object sender, GridViewSortEventArgs e)
        {
            WBLogging.Debug("In gridView_Sorting with e.SortExpression = " + e.SortExpression);

            string sortExpression = e.SortExpression;

            ViewState["SortExpression"] = sortExpression;

            sortColumn = WBColumn.GetKnownColumnByInternalName(sortExpression);

            if (GridViewSortDirection == SortDirection.Ascending)
            {
                GridViewSortDirection = SortDirection.Descending;
                ascending             = false;
                WBLogging.Debug("In gridView_Sorting setting to descending");
            }
            else
            {
                GridViewSortDirection = SortDirection.Ascending;
                ascending             = true;
                WBLogging.Debug("In gridView_Sorting setting to ascending");
            }

            // If we're re-sorting the data let's start back on page 0:
            ShowResults.PageIndex = 0;

            RefreshBoundData();
        }
Beispiel #3
0
        protected void DocumentsForSubject_Sorting(object sender, GridViewSortEventArgs e)
        {
            WBLogging.Debug("In DocumentsForSubject_Sorting with e.SortExpression = " + e.SortExpression);

            SortExpression = e.SortExpression;

            sortColumn = WBColumn.GetKnownColumnByInternalName(SortExpression);

            if (GridViewSortDirection == SortDirection.Ascending)
            {
                GridViewSortDirection = SortDirection.Descending;
                ascending             = false;
                WBLogging.Debug("In gridView_Sorting setting to descending");
            }
            else
            {
                GridViewSortDirection = SortDirection.Ascending;
                ascending             = true;
                WBLogging.Debug("In gridView_Sorting setting to ascending");
            }

            // If we're re-sorting the data let's start back on page 0:
            DocumentsForSubject.PageIndex = 0;

            RefreshBoundDocumentsList();
        }
        private void checkSortState()
        {
            String sortExpression = ViewState["SortExpression"].WBxToString();

            sortColumn = WBColumn.GetKnownColumnByInternalName(sortExpression);

            if (GridViewSortDirection == SortDirection.Ascending)
                ascending = true;
            else
                ascending = false;
        }
Beispiel #5
0
        private void checkSortState()
        {
            sortColumn = WBColumn.GetKnownColumnByInternalName(SortExpression);

            if (GridViewSortDirection == SortDirection.Ascending)
            {
                ascending = true;
            }
            else
            {
                ascending = false;
            }
        }
Beispiel #6
0
        private bool LoadDefaultView()
        {
            SPWeb web = SPContext.Current.Web;

            String selectedViewStyle = web.WBxGetProperty("wbf-wbexplorer-view-style");

            if (String.IsNullOrEmpty(selectedViewStyle))
            {
                return(false);
            }

            SelectedViewStyle = selectedViewStyle;
            SetSortColumn(WBColumn.GetKnownColumnByInternalName(web.WBxGetProperty("wbf-wbexplorer-sort-column")));
            ascending = web.WBxGetBoolProperty("wbf-wbexplorer-sort-ascending");

            if (ascending)
            {
                GridViewSortDirection = SortDirection.Ascending;
            }
            else
            {
                GridViewSortDirection = SortDirection.Descending;
            }


            SelectedWorkBoxStatusFilter = web.WBxGetProperty("wbf-wbexplorer-status-filter");

            SelectedInvolvementFilter = web.WBxGetProperty("wbf-wbexplorer-involvement-filter");
            SelectedRecordsTypeGUID   = web.WBxGetProperty("wbf-wbexplorer-records-type-guid");


            StatusCheckBox.Checked              = web.WBxGetBoolProperty("wbf-wbexplorer-status-check-box");
            RecordsTypeCheckBox.Checked         = web.WBxGetBoolProperty("wbf-wbexplorer-records-type-check-box");
            LastModifiedCheckBox.Checked        = web.WBxGetBoolProperty("wbf-wbexplorer-last-modified-check-box");
            LastVisitedCheckBox.Checked         = web.WBxGetBoolProperty("wbf-wbexplorer-last-visited-check-box");
            DateCreatedCheckBox.Checked         = web.WBxGetBoolProperty("wbf-wbexplorer-date-created-check-box");
            ReferenceDateCheckBox.Checked       = web.WBxGetBoolProperty("wbf-wbexplorer-reference-date-check-box");
            ReferenceIDCheckBox.Checked         = web.WBxGetBoolProperty("wbf-wbexplorer-reference-id-check-box");
            OwningTeamCheckBox.Checked          = web.WBxGetBoolProperty("wbf-wbexplorer-owning-team-check-box");
            InvolvedTeamsCheckBox.Checked       = web.WBxGetBoolProperty("wbf-wbexplorer-involved-teams-check-box");
            VisitingTeamsCheckBox.Checked       = web.WBxGetBoolProperty("wbf-wbexplorer-visiting-teams-check-box");
            InvolvedIndividualsCheckBox.Checked = web.WBxGetBoolProperty("wbf-wbexplorer-involved-individuals-check-box");
            VisitingIndividualsCheckBox.Checked = web.WBxGetBoolProperty("wbf-wbexplorer-visiting-individuals-check-box");

            return(true);
        }
Beispiel #7
0
        public WBItem(Dictionary <String, String> values)
        {
            _listItem        = null;
            _listItemVersion = null;
            _dictionary      = new Dictionary <WBColumn, Object>();
            BackingType      = BackingTypes.Dictionary;

            if (values != null)
            {
                foreach (String internalColumnName in values.Keys)
                {
                    WBColumn column = WBColumn.GetKnownColumnByInternalName(internalColumnName);
                    if (column == null)
                    {
                        throw new Exception("In WBItem(Dictionary<,>): Not yet handling situation when an unknown internal name is used: " + internalColumnName);
                    }
                    this[column] = values[internalColumnName];
                }
            }

            _valuesHaveChanged = false;
        }