Hi friends,
I'm using a radscheduler with recurrence facility, I'm also checking resouce availability in this , wht my problem is , i will expalin this using an example
i have 2 rooms R1 and R2 and 3 users - A,B,C
A and B has meeting in R1 at 10am - 11 am
so i cant schedule meeting for A & B at the same time in room R2 - i checked this , and there is no problem
suppose i'm using a recurrence and no problem while inserting the appointment , problem is while ediiting that recurrence
while ediiting 2 options will ask
1. edit this occurence
2. edit the series
while editing the 1st option i'm getting an error - object reference not set to an instance of an object
for second option no pblm is there
here is the code
private IEnumerable<Resource> GetResources(string resType)
{
List<Resource> availableUsers = new List<Resource>(Owner.Resources.GetResourcesByType("User"));
List<Resource> availableResources = new List<Resource>();
IEnumerable<Resource> resources = Owner.Resources.GetResourcesByType(resType);
foreach (Appointment appointmentInRange in Owner.Appointments.GetAppointmentsInRange(Appointment.Start, Appointment.End))
{
if (appointmentInRange == Appointment)
continue;
foreach (Resource occupiedUser in appointmentInRange.Resources.GetResourcesByType("User"))
{
availableUsers.Remove(occupiedUser);
}
if (availableUsers.Count == 0)
{
found = true;
}
}
return availableUsers;
}
Please help... If anyone of u have an idea
thanking You
Regards
Chinnu
I'm using a radscheduler with recurrence facility, I'm also checking resouce availability in this , wht my problem is , i will expalin this using an example
i have 2 rooms R1 and R2 and 3 users - A,B,C
A and B has meeting in R1 at 10am - 11 am
so i cant schedule meeting for A & B at the same time in room R2 - i checked this , and there is no problem
suppose i'm using a recurrence and no problem while inserting the appointment , problem is while ediiting that recurrence
while ediiting 2 options will ask
1. edit this occurence
2. edit the series
while editing the 1st option i'm getting an error - object reference not set to an instance of an object
for second option no pblm is there
here is the code
private IEnumerable<Resource> GetResources(string resType)
{
List<Resource> availableUsers = new List<Resource>(Owner.Resources.GetResourcesByType("User"));
List<Resource> availableResources = new List<Resource>();
IEnumerable<Resource> resources = Owner.Resources.GetResourcesByType(resType);
foreach (Appointment appointmentInRange in Owner.Appointments.GetAppointmentsInRange(Appointment.Start, Appointment.End))
{
if (appointmentInRange == Appointment)
continue;
foreach (Resource occupiedUser in appointmentInRange.Resources.GetResourcesByType("User"))
{
availableUsers.Remove(occupiedUser);
}
if (availableUsers.Count == 0)
{
found = true;
}
}
return availableUsers;
}
Please help... If anyone of u have an idea
thanking You
Regards
Chinnu