protected void Page_Load(object sender, EventArgs e) { manager = new WBRecordsManager(SPContext.Current.Web.CurrentUser.LoginName); masterLibraryHasVersions = manager.Libraries.ProtectedMasterLibrary.List.EnableVersioning; if (WorkBox.IsWebAWorkBox(SPContext.Current.Web)) { workBox = new WorkBox(SPContext.Current); team = workBox.OwningTeam; } else { team = WBTeam.GetFromTeamSite(SPContext.Current); } if (!IsPostBack && team != null) { WBQuery query = manager.GetQueryForTeamsPublicRecordsToReview(team); WBLogging.Debug("The query is: " + query.JustCAMLQuery(manager.Libraries.ProtectedMasterLibrary.Site)); SPListItemCollection items = manager.Libraries.ProtectedMasterLibrary.List.WBxGetItems(manager.Libraries.ProtectedMasterLibrary.Site, query); RenderFoundRecords(items); } }
protected void Page_Load(object sender, EventArgs e) { manager = new WBRecordsManager(); workBox = new WorkBox(SPContext.Current); if (!IsPostBack) { WBQuery query = new WBQuery(); query.AddFilter(WBColumn.RecordID, WBQueryClause.Comparators.GreaterThan, 100); query.AddEqualsFilter(WBColumn.OwningTeam, workBox.OwningTeam); query.AddEqualsFilter(WBColumn.LiveOrArchived, WBColumn.LIVE_OR_ARCHIVED__LIVE); query.AddEqualsFilter(WBColumn.ProtectiveZone, WBRecordsType.PROTECTIVE_ZONE__PUBLIC); //query.AddFilter(WBColumn.ReviewDate, WBQueryClause.Comparators.LessThan, DateTime.Now); query.RecursiveAll = true; WBLogging.Debug("The query is: " + query.JustCAMLQuery(manager.Libraries.ProtectedMasterLibrary.Site)); SPListItemCollection items = manager.Libraries.ProtectedMasterLibrary.List.WBxGetItems(manager.Libraries.ProtectedMasterLibrary.Site, query); RenderFoundRecords(items); } }