Compartilhar via


SPRegionalSettings.WorkDayEndHour property

Obtém ou define a hora padrão em que o dia útil termina no calendário em uso no servidor.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaração
Public Property WorkDayEndHour As Short
    Get
    Set
'Uso
Dim instance As SPRegionalSettings
Dim value As Short

value = instance.WorkDayEndHour

instance.WorkDayEndHour = value
public short WorkDayEndHour { get; set; }

Property value

Type: System.Int16
Um inteiro de 16 bits que especifica a hora padrão no qual o dia de trabalho termina.

Comentários

A lista a seguir mostra os valores possíveis e os horários em que eles representam:

  • 0 - 12:00 AM

  • 60 - 1:00 AM

  • 120 - 2:00 AM

  • 180 - 3:00 AM

  • 240 - 4:00 AM

  • 300 - 5:00 AM

  • 360 - 6:00 AM

  • 320 - 7:00 AM

  • 480 - 8:00 AM

  • 540 - 9:00 AM

  • 600 - 10:00 AM

  • 660 - 11:00 AM

  • 720 - 12:00 PM

  • 780 - 1:00 PM

  • 840 - 2:00 PM

  • 900 - 3:00 PM

  • 960 - 4:00 PM

  • 1020 - 5:00 PM

  • 1080 - 18H00

  • 1140 - 7:00 PM

  • 1200 - 8:00 PM

  • 1260 - 9:00 PM

  • 1320 - 10:00 PM

  • 1380 - 11:00 PM

Examples

O exemplo de código a seguir define a hora de início para 9 am e a hora de término para 18: 00 nas configurações regionais do site raiz.

Dim siteCollection As New SPSite("https://localhost")
Try
    Dim rootWebSite As SPWeb = siteCollection.RootWeb
    Dim regionalsettings As SPRegionalSettings = rootWebSite.RegionalSettings
    regionalsettings.WorkDayStartHour = 540
    regionalsettings.WorkDayEndHour = 1080

    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; 
        SPTimeZone oTimeZoneIndianaEast = oRegionalSettings.TimeZones[15]; 
        oRegionalSettings.TimeZone.ID = oTimeZoneIndianaEast.ID; 
        oWebsiteRoot.Update();
    }
}

Dica

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.

Ver também

Referência

SPRegionalSettings class

SPRegionalSettings members

Microsoft.SharePoint namespace