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.
Unfortunately, activation email could not send to your email. Please try again.

How can I get a "CustomAppointment"?

Thread ID:

Created:

Updated:

Platform:

Replies:

125396 Aug 12,2016 09:46 AM Aug 17,2016 06:35 AM WPF 3
loading
Tags: SfSchedule
Berezkin Gena
Asked On August 12, 2016 09:46 AM

Hello. 

I attached the project file. If you run the project, you receive an error typecast. How can I get "CustomAppointment" using "SchedulerAppointment"?

Attachment: SfSchedule_CalendarEdit_3159e7ad.rar

Vigneshkumar Ramasamy [Syncfusion]
Replied On August 16, 2016 03:00 AM

Hi Berezkin, 
Based on your requirement we have modified the previous attached sample to get custom appointment from the schedule appointment and please find the sample in the below link. 
In the above sample we have used the below code snippet to get the custom appointment. 
  
var CustomAPP = GetCustomAppointment(schedule.Appointments[0]); 
 
>>>>>>>>>>>>>>>>>>>> 
 
  CustomAppointment GetCustomAppointment(ScheduleAppointment app) 
        { 
            CustomAppointment CustomApp = new CustomAppointment(); 
            CustomApp.Name = app.Subject; 
            CustomApp.Locaion = app.Location; 
            CustomApp.AppointmentStartTime = app.StartTime; 
            CustomApp.AppointmentEndTime = app.EndTime; 
            return CustomApp; 
        } 
 
If the above provided solution doesn’t satisfy you requirement could you, please provide more information about your requirement? So that we could analyze on your requirement further and provide you the possible solution. 
Regards 
Vigneshkumar R 


Berezkin Gena
Replied On August 16, 2016 06:01 AM

How can I get the Name (or Appointment_ID) property? He is not in the Schedule Appointment.
        CustomAppointment GetCustomAppointment(ScheduleAppointment app)
        {
            CustomAppointment CustomApp = new CustomAppointment();
            CustomApp.Name = app.Subject;
            CustomApp.Locaion = app.Location;
            CustomApp.AppointmentStartTime = app.StartTime;
            CustomApp.AppointmentEndTime = app.EndTime;
            CustomApp.Name = ???app.Name???;
            return CustomApp;
        }

Vigneshkumar Ramasamy [Syncfusion]
Replied On August 17, 2016 06:35 AM

Hi Berezkin, 
As of now your requirement of getting Appointment_ID can be achieved by using CustomAppointment collection (Source). We have prepared a sample for the same and please find the sample in the below link. 
In the above sample we have used below code snippet to get the Appointment_ID. 
     foreach(CustomAppointment CustomApponitment in Source) 
            {  
                if(app.ObjectID== CustomApponitment.GetHashCode()) 
                { 
                    CustomApp.Appointment_ID = CustomApponitment.Appointment_ID; 
                } 
            } 
 
Regards 
Vigneshkumar R 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;