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

Appointments not matchin db yet works ok for web version

1 Answer 72 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Philip
Top achievements
Rank 1
Philip asked on 08 Apr 2016, 01:51 PM

I am trying to use the sechuler to provide just reminders I dont no if i need the full blown component though as i just seen the reminder dialog component however the code is doing something weird but

 

01.private void Form1_Load(object sender, EventArgs e)
02.      {
03.          setupReminders();
04.          ApertureNetIcon.BalloonTipText = "Aperture Net Notfications.";
05.          ApertureNetIcon.BalloonTipTitle = "ApertureNet";
06.          this.WindowState = FormWindowState.Minimized;
07.      }
08. 
09.      private void Form1_Resize(object sender, EventArgs e)
10.      {
11.          if (WindowState == FormWindowState.Minimized)
12.          {
13.              ShowInTaskbar = false;
14.              ApertureNetIcon.Visible = true;
15.              ApertureNetIcon.ShowBalloonTip(1000);
16.          }
17.      }
18. 
19.      private void setupReminders()
20.      {
21.          SchedulerBindingDataSource dataSource = new SchedulerBindingDataSource();
22.          AppointmentMappingInfo appointmentMappingInfo1 = new AppointmentMappingInfo();
23.          dataSource.EventProvider.DataSource = _dal.GetAllAppointments();
24. 
25.          appointmentMappingInfo1.Description = "Subject";
26. 
27.          appointmentMappingInfo1.End = "End";
28.          appointmentMappingInfo1.Start = "Start";
29.          appointmentMappingInfo1.Reminder = "Reminder";
30.          appointmentMappingInfo1.ResourceId = "ResourceID";
31.          dataSource.EventProvider.Mapping = appointmentMappingInfo1;
32.          this.radScheduler1.DataSource = dataSource;
33.      }

This is the get all appointments

 

01./// <summary>
02./// Gets all apointments.
03./// </summary>
04./// <returns></returns>
05.public IQueryable<Appointment> getAllApointments()
06.{
07.    try
08.    {
09.        var _appointments = apertureNetEntities.Appointments.Where(f => f.isDeleted == false).OrderByDescending(o => o.TimeCode).ToList();
10.        return _appointments.AsQueryable();
11.    }
12.    catch (Exception ex)
13. 
14.    {
15.        string inner = string.Empty;
16.        if (ex.InnerException != null)
17.        {
18.            inner = ex.InnerException.ToString();
19.        }
20.        logger.Error("Error in IQueryable function getAllApointments " + ex.ToString() + " " + inner);
21.        return null;
22.    }
23.}

And if you look in my sql data and my app screen shot its not matching up to whats in the db so it is not i dont understand as displays fine in the web version ?.

 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 11 Apr 2016, 07:39 AM
Hello Philip,

Thank you for writing.

Please refer to the following help article which is quite useful about RadScheduler data binding: http://docs.telerik.com/devtools/winforms/scheduler/data-binding/using-datasource-property

I have attached a sample project as well for your reference. 

I hope this information helps. Should you have further questions I would be glad to help.

  Regards,
Dess
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
Scheduler and Reminder
Asked by
Philip
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or