protected void updatePanelWithRecordsTypeDetails(WBRecordsType recordsType) { RecordsTypeName.Text = recordsType.Name; LastModfiedDate.Text = String.Format("{0:d/M/yyyy HH:mm:ss}", recordsType.Term.LastModifiedDate); RecordsTypeDescription.Text = recordsType.Description; DefaultFunctionalArea.Text = recordsType.DefaultFunctionalAreaUIControlValue; AllowOtherFunctionalAreas.Checked = recordsType.AllowOtherFunctionalAreas; // First the work box details: AllowWorkBoxRecords.Checked = recordsType.AllowWorkBoxRecords; WhoCanCreateNewWorkBoxes.DataSource = WBRecordsType.getWhoCanCreateOptions(); WhoCanCreateNewWorkBoxes.DataBind(); WhoCanCreateNewWorkBoxes.WBxSafeSetSelectedValue(recordsType.WhoCanCreateNewWorkBoxes); CreateNewWorkBoxText.Text = recordsType.CreateNewWorkBoxText; WorkBoxUniqueIDPrefix.Text = recordsType.WorkBoxUniqueIDPrefix; WorkBoxLocalIDSource.DataSource = WBRecordsType.getWorkBoxLocalIDSources(); WorkBoxLocalIDSource.DataBind(); WorkBoxLocalIDSource.WBxSafeSetSelectedValue(recordsType.WorkBoxLocalIDSource); WorkBoxGeneratedLocalIDOffset.Text = recordsType.WorkBoxGeneratedLocalIDOffset.ToString(); WorkBoxShortTitleRequirement.DataSource = WBRecordsType.getRequirementOptions(); WorkBoxShortTitleRequirement.DataBind(); WorkBoxShortTitleRequirement.WBxSafeSetSelectedValue(recordsType.WorkBoxShortTitleRequirement); WorkBoxShortTitleDescription.Text = recordsType.WorkBoxShortTitleDescription; WorkBoxReferenceIDRequirement.DataSource = WBRecordsType.getRequirementOptions(); WorkBoxReferenceIDRequirement.DataBind(); WorkBoxReferenceIDRequirement.WBxSafeSetSelectedValue(recordsType.WorkBoxReferenceIDRequirement); WorkBoxReferenceIDDescription.Text = recordsType.WorkBoxReferenceIDDescription; WorkBoxReferenceDateRequirement.DataSource = WBRecordsType.getRequirementOptions(); WorkBoxReferenceDateRequirement.DataBind(); WorkBoxReferenceDateRequirement.WBxSafeSetSelectedValue(recordsType.WorkBoxReferenceDateRequirement); WorkBoxReferenceDateDescription.Text = recordsType.WorkBoxReferenceDateDescription; WorkBoxSeriesTagRequirement.DataSource = WBRecordsType.getRequirementOptions(); WorkBoxSeriesTagRequirement.DataBind(); WorkBoxSeriesTagRequirement.WBxSafeSetSelectedValue(recordsType.WorkBoxSeriesTagRequirement); WorkBoxSeriesTagParentTerm.Text = recordsType.WorkBoxSeriesTagParentTermUIControlValue; WorkBoxSeriesTagAllowNewTerms.Checked = recordsType.WorkBoxSeriesTagAllowNewTerms; WorkBoxSeriesTagDescription.Text = recordsType.WorkBoxSeriesTagDescription; WorkBoxNamingConventions.DataSource = WBRecordsType.getWorkBoxNamingConventions(); WorkBoxNamingConventions.DataBind(); WorkBoxNamingConventions.WBxSafeSetSelectedValue(recordsType.WorkBoxNamingConvention); AutoCloseTriggerDate.DataSource = WBRecordsType.getAutoCloseTriggerDates(); AutoCloseTriggerDate.DataBind(); AutoCloseTriggerDate.WBxSafeSetSelectedValue(recordsType.AutoCloseTriggerDate); AutoCloseTimeUnits.DataSource = WBRecordsType.getAutoCloseUnits(); AutoCloseTimeUnits.DataBind(); AutoCloseTimeUnits.WBxSafeSetSelectedValue(recordsType.AutoCloseTimeUnit); AutoCloseTimeScalar.Text = recordsType.AutoCloseTimeScalarAsString; RetentionTriggerDate.DataSource = WBRecordsType.getRetentionTriggerDates(); RetentionTriggerDate.DataBind(); RetentionTriggerDate.WBxSafeSetSelectedValue(recordsType.RetentionTriggerDate); RetentionUnits.DataSource = WBRecordsType.getRetentionUnits(); RetentionUnits.DataBind(); RetentionUnits.WBxSafeSetSelectedValue(recordsType.RetentionTimeUnit); RetentionScalar.Text = recordsType.RetentionTimeScalarAsString; AllowPublishingOut.Checked = recordsType.AllowPublishingOut; MinimumPublishingOutProtectiveZone.DataSource = WBRecordsType.getProtectiveZones(); MinimumPublishingOutProtectiveZone.DataBind(); MinimumPublishingOutProtectiveZone.WBxSafeSetSelectedValue(recordsType.MinimumPublishingOutProtectiveZone); GenerateFilenames.Checked = recordsType.GeneratePublishOutFilenames; UseDefaults.Checked = recordsType.UseDefaultsWhenPublishingOut; DefaultRecordsType.Text = recordsType.DefaultPublishingOutRecordsTypeUIControlValue; WorkBoxCollectionURLProperty.Text = recordsType.WorkBoxCollectionUrlProperty; WorkBoxCollectionURL.Text = recordsType.WorkBoxCollectionUrl; CacheDetailsForOpenWorkBoxes.Checked = recordsType.CacheDetailsForOpenWorkBoxes; // Now the document details: AllowDocumentRecords.Checked = recordsType.AllowDocumentRecords; ProtectiveZones.DataSource = WBRecordsType.getProtectiveZones(); ProtectiveZones.DataBind(); ProtectiveZones.WBxSafeSetSelectedValue(recordsType.DocumentMinimumProtectiveZone); DocumentReferenceIDRequirement.DataSource = WBRecordsType.getRequirementOptions(); DocumentReferenceIDRequirement.DataBind(); DocumentReferenceIDRequirement.WBxSafeSetSelectedValue(recordsType.DocumentReferenceIDRequirement); DocumentReferenceIDDescription.Text = recordsType.DocumentReferenceIDDescription; DocumentReferenceDateRequirement.DataSource = WBRecordsType.getRequirementOptions(); DocumentReferenceDateRequirement.DataBind(); DocumentReferenceDateRequirement.WBxSafeSetSelectedValue(recordsType.DocumentReferenceDateRequirement); DocumentReferenceDateSource.DataSource = WBRecordsType.getReferenceDateSources(); DocumentReferenceDateSource.DataBind(); DocumentReferenceDateSource.WBxSafeSetSelectedValue(recordsType.DocumentReferenceDateSource); DocumentReferenceDateDescription.Text = recordsType.DocumentReferenceDateDescription; DocumentSeriesTagRequirement.DataSource = WBRecordsType.getRequirementOptions(); DocumentSeriesTagRequirement.DataBind(); DocumentSeriesTagRequirement.WBxSafeSetSelectedValue(recordsType.DocumentSeriesTagRequirement); DocumentSeriesTagParentTerm.Text = recordsType.DocumentSeriesTagParentTermUIControlValue; DocumentSeriesTagAllowNewTerms.Checked = recordsType.DocumentSeriesTagAllowNewTerms; DocumentSeriesTagDescription.Text = recordsType.DocumentSeriesTagDescription; DocumentScanDateRequirement.DataSource = WBRecordsType.getRequirementOptions(); DocumentScanDateRequirement.DataBind(); DocumentScanDateRequirement.WBxSafeSetSelectedValue(recordsType.DocumentScanDateRequirement); DocumentScanDateDescription.Text = recordsType.DocumentScanDateDescription; DocumentNamingConvention.DataSource = WBRecordsType.getDocumentNamingConventions(); DocumentNamingConvention.DataBind(); DocumentNamingConvention.WBxSafeSetSelectedValue(recordsType.DocumentNamingConvention); EnforceDocumentNamingConvention.Checked = recordsType.EnforceDocumentNamingConvention; FilingRuleLevel1.DataSource = WBRecordsType.getFilingRules(); FilingRuleLevel1.DataBind(); FilingRuleLevel1.WBxSafeSetSelectedValue(recordsType.FilingRuleLevel1); FilingRuleLevel2.DataSource = WBRecordsType.getFilingRules(); FilingRuleLevel2.DataBind(); FilingRuleLevel2.WBxSafeSetSelectedValue(recordsType.FilingRuleLevel2); FilingRuleLevel3.DataSource = WBRecordsType.getFilingRules(); FilingRuleLevel3.DataBind(); FilingRuleLevel3.WBxSafeSetSelectedValue(recordsType.FilingRuleLevel3); FilingRuleLevel4.DataSource = WBRecordsType.getFilingRules(); FilingRuleLevel4.DataBind(); FilingRuleLevel4.WBxSafeSetSelectedValue(recordsType.FilingRuleLevel4); WBFarm farm = WBFarm.Local; if (!String.IsNullOrEmpty(farm.ProtectedRecordsLibraryUrl)) { using (SPSite recordsSite = new SPSite(farm.ProtectedRecordsLibraryUrl)) using (SPWeb recordsWeb = recordsSite.OpenWeb()) { string link = farm.ProtectedRecordsLibraryUrl + "/_layouts/expirationconfig.aspx?RootFolder="; SPList library = recordsWeb.GetList(farm.ProtectedRecordsLibraryUrl); string rootFolder = library.RootFolder.ServerRelativeUrl + recordsType.FullPath; link += Uri.EscapeDataString(rootFolder); link += "&List=" + library.ID.WBxToString(); LinkToRecordsCenterConfig.Text = "<a href=\"" + link + "\">Configure document retention</a>"; } } }