SPRegionalSettings.AlternateCalendarType 属性
指定列表是否显示在网站的快速启动区域。
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Property AlternateCalendarType As Short
Get
Set
用法
Dim instance As SPRegionalSettings
Dim value As Short
value = instance.AlternateCalendarType
instance.AlternateCalendarType = value
public short AlternateCalendarType { get; set; }
属性值
类型:System.Int16
一个 16 位整数,它指定的备用日历的类型。
备注
AlternateCalendarType属性接受下列整数值:
0 — 无
1 — 公历
3 — 日本和历
5 — 韩国檀君日历
6 — 阿拉伯回历
7 — 佛历
8 — 希伯来农历
9 — 罗马教皇中东法国日历
10 — 公历-阿拉伯语
11 — 公历-英语转译
12 — 罗马教皇音译法语日历
16 — 萨卡时代日历
如果使用设置为任何其他值,公历。
示例
下面的代码示例将网站的备用日历设置为泰历。
Dim siteCollection As New SPSite("https://localhost")
Try
Dim rootWebSite As SPWeb = siteCollection.RootWeb
Dim regionalsettings As SPRegionalSettings = rootWebSite.RegionalSettings
regionalsettings.AlternateCalendarType = 7
rootWebSite.Update()
rootWebSite.Dispose()
Finally
siteCollection.Dispose()
End Try
using (SPSite oSiteCollection = new SPSite("https://localhost"))
{
using (SPWeb oWebsiteRoot = oSiteCollection.RootWeb)
{
SPRegionalSettings oRegionalSettings = oWebsiteRoot.RegionalSettings;
oRegionalSettings.AlternateCalendarType = 7;
oWebsiteRoot.Update();
}
}
备注
Certain objects implement the IDisposable interface, and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Disposing Objects.