Guys,
I previously had my scheduler set up to be the regular way, server side w/ postbacks, and I had a lot of custom functionality built into the AppointmentDataBound function that now doesn't work because I'm running web services binding.
How can I build this functionality with web services binding? It's key to my project working.
Even my Category resource list is managed via the database, so I can't use the static resource coloring feature.
Thoughts?
protected void radAppointments_AppointmentDataBound(object sender, SchedulerEventArgs e) {
if (e.Appointment.Resources.GetResourceByType("Category") != null) {
bvAppointmentCategory c = new bvAppointmentCategory(int.Parse(e.Appointment.Resources.GetResourceByType("Category").Key.ToString()));
e.Appointment.CssClass = c.CssClass;
}
if (e.Appointment.ID != null) {
bvAppointmentDoctor a;
if (e.Appointment.RecurrenceParentID == null) {
a = new bvAppointmentDoctor(int.Parse(e.Appointment.ID.ToString()));
} else {
a = new bvAppointmentDoctor(int.Parse(e.Appointment.RecurrenceParentID.ToString()));
}
String subject = e.Appointment.Subject;
String client_name = "";
String pet_name = "";
String confirmed = "";
if (a.ClientID != null) {
bvClient client = new bvClient(a.ClientID.Value);
client_name = " w/ " + client.PrimaryFirstName + " " + client.PrimaryLastName + " @ " + client.PrimaryPhoneHome;
}
if (a.PetID != null) {
bvPet p = new bvPet(a.PetID.Value);
pet_name = " (" + p.Name + ")";
}
if (e.Appointment.RecurrenceState == 0) {
if (a.Confirmed) {
confirmed = " Confirmed? - [X]";
} else {
confirmed = " Confirmed? - [ ]";
}
}
e.Appointment.Subject = subject + client_name + pet_name + confirmed;
}
if (c_security_level < 2) {
e.Appointment.AllowDelete = false;
}
}
I previously had my scheduler set up to be the regular way, server side w/ postbacks, and I had a lot of custom functionality built into the AppointmentDataBound function that now doesn't work because I'm running web services binding.
How can I build this functionality with web services binding? It's key to my project working.
Even my Category resource list is managed via the database, so I can't use the static resource coloring feature.
Thoughts?
protected void radAppointments_AppointmentDataBound(object sender, SchedulerEventArgs e) {
if (e.Appointment.Resources.GetResourceByType("Category") != null) {
bvAppointmentCategory c = new bvAppointmentCategory(int.Parse(e.Appointment.Resources.GetResourceByType("Category").Key.ToString()));
e.Appointment.CssClass = c.CssClass;
}
if (e.Appointment.ID != null) {
bvAppointmentDoctor a;
if (e.Appointment.RecurrenceParentID == null) {
a = new bvAppointmentDoctor(int.Parse(e.Appointment.ID.ToString()));
} else {
a = new bvAppointmentDoctor(int.Parse(e.Appointment.RecurrenceParentID.ToString()));
}
String subject = e.Appointment.Subject;
String client_name = "";
String pet_name = "";
String confirmed = "";
if (a.ClientID != null) {
bvClient client = new bvClient(a.ClientID.Value);
client_name = " w/ " + client.PrimaryFirstName + " " + client.PrimaryLastName + " @ " + client.PrimaryPhoneHome;
}
if (a.PetID != null) {
bvPet p = new bvPet(a.PetID.Value);
pet_name = " (" + p.Name + ")";
}
if (e.Appointment.RecurrenceState == 0) {
if (a.Confirmed) {
confirmed = " Confirmed? - [X]";
} else {
confirmed = " Confirmed? - [ ]";
}
}
e.Appointment.Subject = subject + client_name + pet_name + confirmed;
}
if (c_security_level < 2) {
e.Appointment.AllowDelete = false;
}
}