Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
how to get appointment's data which isn't shown at the current monthview page
posted

Hello.

Now I face a problem, for example, at the current page, the monthview calendar show December date. But I want to get the data of appoitment at someday of Oct.

Please help me if there is some method of monthview or appointment can solve the problem.

Parents
No Data
Reply
  • 2677
    posted

    Hello,

    If you want to check appointments for other months that are not in the month view, you will have to go back to the server.  So, in the little sample I created, I just added a button and handled the click event.  Inside the click event is the below code.  First, you have to DataBind the webscheduleinfo so you can get at the activities/appointments.  Then, specify a date to get the appointments on.  Then Fetch the resources the provider has.  You can also just use the WebScheduleInfo.ActiveResource, but I showed you how to get any of the resources.  Then, just use the method GetAppointmensForDate and pass in the appropriate resource and date.  This will give you a collection of appointments from which you can analyze.  This should do the trick.  Just remember, you have to go to the server and you have to call databind on the WebScheduleInfo.

    protected void Button1_Click(object sender, EventArgs e)
    {
        this.WebScheduleInfo1.DataBind();
        SmartDate date = new SmartDate(2010,11,11);
        ArrayList resources = (ArrayList)this.WebScheduleOleDbProvider1.FetchResources();
        AppointmentsSubsetCollection appCol = this.WebScheduleInfo1.GetAppointmentsForDate((Resource)resources[0], date);
        Appointment ap = appCol[0];           
    }

     

Children
No Data