This question is locked. New answers and comments are not allowed.
I have a custom appointment and I want to validate if any resources are checked. I can find no way to check this before the OK button is clicked. In this forum I found an example so here is what I did:
Problem is that AppointmentResources.Count is always zero. It seems that checking a resource does not update the AppointmentResource entity collection. What am I doing wrong? How can I validate that resources are checked?
Regards
Neils
public partial class dbAppointment : IAppointment, IExtendedAppointment, IDataErrorInfo { ... ... public string Error { get { return ValidateAppointment(); } } private string ValidateAppointment() { string errorString = this.ValidateResources(); return errorString; } private string ValidateResources() { if(this.AppointmentResource.Count == 0) { return "Please choose at least one resource."; } return null; } }Problem is that AppointmentResources.Count is always zero. It seems that checking a resource does not update the AppointmentResource entity collection. What am I doing wrong? How can I validate that resources are checked?
Regards
Neils