We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to gather information in code behind to send to database?

I apologise for what I'm sure is a very primitive question.

I created a custom appointment editor and have managed to create and send data to a database when I add appointments, but I can't work out how to edit appointments. My problem lies in not knowing how to gather information about the appointment in code-behind. I've found lots of guides detailing how to add new appointments, but nothing showing how to gather information in the code behind in order to send to a database. For example, how do I set a string to the value of the MappedSubject?

Again, I apologize for the primitive question, I'm simply trying to make a little application for my wife and I and have very limited knowledge of c# or WPF.





4 Replies

VR Vigneshkumar Ramasamy Syncfusion Team May 2, 2016 12:43 PM UTC

Hi Matthew, 
Thanks for using Syncfusion product. 
Based on the provided information we suspect that, the properties which you have used in the custom appointment class may not be INotifyPropertyChanged. If it is not make it as INotifyPropertyChanged. 
 If the above provided solution doesn’t satisfy your requirement, could you please provide a simple sample to reproduce this issue, so that we could analyze on you requirement further and provide you the possible solution. 
Regards 
Vigneshkumar R


MS Matthew spencer May 3, 2016 01:23 AM UTC

Sorry for not being clear. I basically just need to know how to gather information from the clicked appointment so I can link it with my custom appointment editor window.

private void SfSchedule_OnAppointmentEditorOpening(object sender, AppointmentEditorOpeningEventArgs e) {

e.Cancel = true;

if (e.Action.ToString() == "Add")
                {
                    ApptEditor = new CalendarApptPopUp();
                    ApptEditor.Show();
                }
                else if (e.Action.ToString() == "Edit")
                {
      // gather information from the clicked appointment so I can link it to my custom appointment editor.

}


MS Matthew spencer May 3, 2016 03:01 AM UTC

Urgh, feel free to delete this. I misread that you had to cast the e.appointment.

Thanks for your time.


VR Vigneshkumar Ramasamy Syncfusion Team May 3, 2016 10:05 AM UTC

Hi Matthew, 


 

We are glad to hear that your issue has been resolved. Please let us know if need further assistance on this.  


 

Regards 

Vigneshkumar R 



SIGN IN To post a reply.
Loader.
Live Chat Icon For mobile
Up arrow icon