void SetupMappings() { ASPxAppointmentMappingInfo mappings = Storage.Appointments.Mappings; ASPxAppointmentCustomFieldMappingCollection customFieldMappings = Storage.Appointments.CustomFieldMappings; Storage.BeginUpdate(); try { mappings.AppointmentId = "Id"; mappings.Start = "StartTime"; mappings.End = "EndTime"; mappings.Subject = "Subject"; mappings.AllDay = "AllDay"; mappings.Description = "Description"; mappings.Label = "Label"; mappings.Location = "Location"; mappings.RecurrenceInfo = "RecurrenceInfo"; mappings.ReminderInfo = "ReminderInfo"; mappings.ResourceId = "OwnerId"; mappings.Status = "Status"; mappings.Type = "EventType"; customFieldMappings.Add(new AppointmentCustomFieldMapping("Field1", "Price", FieldValueType.Decimal)); } finally { Storage.EndUpdate(); } }
public static void SetupMappings(ASPxScheduler control) { ASPxSchedulerStorage storage = control.Storage; ASPxAppointmentMappingInfo mappings = storage.Appointments.Mappings; storage.BeginUpdate(); try { mappings.AppointmentId = "Id"; mappings.Start = "StartTime"; mappings.End = "EndTime"; mappings.Subject = "Subject"; mappings.AllDay = "AllDay"; mappings.Description = "Description"; mappings.Label = "Label"; mappings.Location = "Location"; mappings.RecurrenceInfo = "RecurrenceInfo"; mappings.ReminderInfo = "ReminderInfo"; mappings.ResourceId = "OwnerId"; mappings.Status = "Status"; mappings.Type = "EventType"; } finally { storage.EndUpdate(); } ASPxAppointmentCustomFieldMappingCollection customMappings = storage.Appointments.CustomFieldMappings; customMappings.BeginUpdate(); try { customMappings.Add(new AppointmentCustomFieldMapping("Price", "Price")); customMappings.Add(new AppointmentCustomFieldMapping("ContactInfo", "ContactInfo")); } finally { customMappings.EndUpdate(); } }