Item

Beschreibung:

Gibt einen Termin zurück. Es muss die Index-Nummer des Termins übergeben werden. Der Index geht von 1 bis Count.

Parameter:

Parametername

Typ

Beschreibung

Index

Long

Index-Nummer.

 

Rückgabewert:

Appointment

Beispiel VBScript:

' Es wird überprüft wie viele ganztägige Termine (im Vergleich zur Gesamtanzahl an Terminen) vorhanden sind

 

Dim nCount : nCount = 0

Dim nCountAllAppointments : nCountAllAppointments = cRM.CurrentProject.timemanager.Appointments.Count

Dim nCountAllDayEvents : nCountAllDayEvents = 0

Dim oAppointment

 

For nCount = 1 To nCountAllAppointments

 

  Set oAppointment = cRM.CurrentProject.timemanager.Appointments.Item(nCount)

  If (oAppointment.AllDayEvent = True) Then

    nCountAllDayEvents = nCountAllDayEvents + 1

  End If

  Set oAppointment = Nothing

 

Next

 

Call cRM.DialogMessageBox("Bei der Gesamtanzahl von " & CStr(nCountAllAppointments) & " Terminen, gibt es " & CStr(nCountAllDayEvents) & " ganztägige Termine.", "Appointments.Item", vbOkonly)

Beispiel C#-Script:

// Es wird überprüft wie viele ganztägige Termine (im Vergleich zur Gesamtanzahl an Terminen) vorhanden sind

 

int count = 0;

long countAllAppointments = cRM.CurrentProject.TimeManager.Appointments.Count;

int countAllDayEvents = 0;

 

Appointment appointment;

 

for (count = 1; count <= countAllAppointments; count++)

{

    appointment = cRM.CurrentProject.TimeManager.Appointments.Item(count);

 

    if (appointment.AllDayEvent == true)

    {

        countAllDayEvents++;

    }

 

    appointment.Dispose();

}

 

cRM.DialogMessageBox("Bei der Gesamtanzahl von " + countAllAppointments.ToString() + " Terminen, gibt es " + countAllDayEvents + " ganztägige Termine.", "Appointments.Item", 0);