Hi,
I want to bind UltraCalendarInfo used by WinSchedule with EF.
Is that possible ? Can anyone help me, when possible, with an example ?
Thnx
Hi Ton,
Good to hear you are having progress with the implementation.
I believe the confusion here stems from the fact that the dialog only adds a single appointment at a time. The AfterAppointmentAdded Event will fire either: 1. The first time you click File -> Save in the dialog or altrernatively on 2. Directly licking the Save & Close button.
I am under the impression that you assume that editing the information after clicking File->Save in the dialog initiates a new Appointment adding. However, this is not the case and the dialog is only editing the already added appointment.
Anyways, there is the AfterCloseAppointmentDialog Event, which you can use for that purpose. Also here is a complete list of the exposed by the UltraCalendarInfo class events. I hope this information helps.
Best regards,
Bozhidara Pachilova
Hi Bozhidara
Finally i got it almost working.
I made a did'nt gave the appointmenttable a key :-(
Now i put the savechanges() into the ultraCalenderInfo_afterappoinmentadded event
Due to some unkown reason not all the added appointments are saved in the database.
is there a possibility to add it somewhere in the routine when the save& close button is clicked on the appointdialog?
can you advise?
Hi Bozhidara,
i'm still struggling with the 2 way binding. When i open sthe schedule form i can add an appointment to the schedule using the dialog. it will be visble in the calendar. When i add another one i get an error that already one object is tracked.
Probably it is not written to the database.
Where can i track if an owner or appointment is added or edited so i can write the appropiate routines
Or is there an better solution ?
best regards
Ton
Thank you for following up!
Sure, I believe the approach would be the same for the OwnersDataBinding, so feel free to test it as well. Regarding persisting the changes, I tested this as well by calling this.dbContext.SaveChanges(); in the AppointmentResized event as an example. When restarting the app the changes of the Start/End times made by resizing were correctly saved. So, yes, the changes could be persisted on certain events, or whenever needed and you as the developer is in control of that. Please, check on the WinSchedule API for an exhaustive list of the exposed events and properties.
thnx Bozhidara
I was noit aware thaty it is out of scope. The more thanx for the reply.Have just a litte question more.
For the owner binding its the same recipe ?And change are saved by savechanges()?