This is a migrated thread and some comments may be shown as answers.

Appointment Insert

1 Answer 94 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Nikola
Top achievements
Rank 2
Nikola asked on 01 Feb 2013, 09:56 AM
I want to add some data to my scheduler with my common RadScheduler1_AppointmentInsert method but somehow its not working ...  maybe I'm totally wrong but I thing that should work some how like that ... 
do i need to parse some thing bc
Tilte = Varchar
FromDate/ToDate = DateTime
RecurrenceRule/RecurrenceRuleID = int
Houers = float 
protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
       {
           if (ExceedsLimit(e.Appointment))
           {
               e.Cancel = true;
               RegisterScript();
           }
           else
           {
                
               int id = HtUser.GetUserIdByLogin(Page.User.Identity.Name);
               //e.Appointment.Attributes.Add("UserId", id.ToString());
               HtVacationDay vacationDay = new HtVacationDay();
 
               vacationDay.Title = e.Appointment["Title"];
               vacationDay.FromDate =e.Appointment["FromDate"];
               vacationDay.ToDate = e.Appointment["ToDate"];
               vacationDay.RecurrenceRule = e.Appointment["RecurrenceRule"];
               vacationDay.RecurrenceRuleID = e.Appointment["RecurrenceRuleID"];
               vacationDay.Hours = e.Appointment["Hours"];
           }
       }
thanks for help and fast answer 

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 06 Feb 2013, 06:51 AM
Hello Nikola,

 
I have inspected the code provided but it is not quite clear what are you actually trying to achieve with it and what is not working properly. Would you please elaborate a little bit?

All the best,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
Nikola
Top achievements
Rank 2
Answers by
Plamen
Telerik team
Share this question
or