Appointment Insert

2 posts, 0 answers
  1. Nikola
    Nikola avatar
    65 posts
    Member since:
    Sep 2012

    Posted 01 Feb 2013 Link to this post

    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 
  2. Plamen
    Admin
    Plamen avatar
    3079 posts

    Posted 06 Feb 2013 Link to this post

    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.
Back to Top