or
var appointmentMappingInfo = new AppointmentMappingInfo(); appointmentMappingInfo.BackgroundId = "ApptStatus"; appointmentMappingInfo.Description = "Description"; appointmentMappingInfo.End = "EndDate"; //appointmentMappingInfo.Location = "Location"; //appointmentMappingInfo.MasterEventId = "ParentID"; //appointmentMappingInfo.RecurrenceRule = "RecurrenceRule"; appointmentMappingInfo.ResourceId = "ProviderId"; //appointmentMappingInfo.Resources = "SchedulerAppointment"; appointmentMappingInfo.Start = "StartDate"; //appointmentMappingInfo.StatusId = "StatusID"; appointmentMappingInfo.Summary = "Subject"; schedulerBindingDataSource1.EventProvider.Mapping = appointmentMappingInfo; var resourceMappingInfo = new ResourceMappingInfo(); resourceMappingInfo.Id = "Id"; resourceMappingInfo.Name = "Name"; schedulerBindingDataSource1.ResourceProvider.Mapping = resourceMappingInfo; _bsAppts = SchedulerRepository.GetAppointments(); schedulerBindingDataSource1.ResourceProvider.DataSource = _opList; schedulerBindingDataSource1.EventProvider.DataSource = _bsAppts; schMain.DataSource = schedulerBindingDataSource1; _opList is a binding list of your Resource object. _bsAppts is a binding list of my business object appointments Thanks!
var dateColumnOut =
new
GridViewDateTimeColumn
{
HeaderText =
"Date Time Out"
,
Name = Data.cJobCardData.JobCardColumns.DateTimeOut,
FieldName = Data.cJobCardData.JobCardColumns.DateTimeOut,
Format = DateTimePickerFormat.Long,
EditorType = GridViewDateTimeEditorType.TimePicker,
FormatString =
"{0: M/d/yyyy h:mm tt}"
,
TextAlignment = ContentAlignment.MiddleCenter,
Width = colWidth
};
private void MoveListBoxItems(ListBox source, ListBox destination)
{
ListBox.SelectedObjectCollection sourceItems = source.SelectedItems;
foreach (var item in sourceItems)
{
destination.Items.Add(item);
}
while (source.SelectedItems.Count > 0)
{
source.Items.Remove(source.SelectedItems[0]);
}
}
private void button1_Click(object sender, EventArgs e)
{
MoveListBoxItems(listBox1, listBox2);
}
private void button2_Click(object sender, EventArgs e)
{
MoveListBoxItems(listBox2, listBox1);
}
Private
Sub
RadScheduler1_AppointmentAdded(sender
As
Object
, e
As
Telerik.WinControls.UI.AppointmentAddedEventArgs)
Handles
RadScheduler1.AppointmentAdded
Dim
app
As
AppointmentWithPhone = TryCast(e.Appointment, AppointmentWithPhone)
If
NameExistsInDB(app.Subject) =
False
Then
Debug.WriteLine(
"Before: "
& RadScheduler1.Appointments.Count)
Me
.RadScheduler1.Appointments.Remove(app)
Debug.WriteLine(
"After: "
& RadScheduler1.Appointments.Count)
End
If
End
Sub