[]
        
(Showing Draft Content)

Assigning Custom Labels to an Appointment

You can also add custom labels using the Label property. The following code, added to the Form_Load event, assigns a custom Meeting label to an appointment:

// Create a new appointment.   
C1.C1Schedule.Appointment app1 = this.c1Schedule1.DataStorage.AppointmentStorage.Appointments.Add();
// Make the appointment an all day event.   
app1.Start = new DateTime(2021, 11, 02, 13, 30, 0);
app1.AllDayEvent = true;
// Set some details for the appointment.   
app1.Subject = "Training";
app1.Location = "Large Conference Room";
// Assign a custom label to the appointment.       
app1.Label = new C1.C1Schedule.Label(Color.DeepSkyBlue, "Meeting", "Meeting");