C1Schedule Set Reminder From Datatbase

Posted by: mwebster on 16 July 2019, 6:08 am EST

    • Post Options:
    • Link

    Posted 16 July 2019, 6:08 am EST

    I am working on an app using the C1Schedule control (VB.NET - Windows forms) and I am using a custom form to create appointments. I need the user to be able to check a checkbox to set a reminder of 15 minutes before the appointment. I can’t see any database mapping to do that though. I can set all the other fields such as the start date and end date but I cannot find any way of telling the schedule control than an appointment requires a reminder.

    Any hints for me?

    Thanks,

    Mike

  • Posted 16 July 2019, 7:38 pm EST

    Hello Mike,



    To setup the Reminder you need to set the ReminderSet and ReminderTimeBeforeStart property of the Appointment class for the particular appointment.​

    In your custom form you can add a checkbox for ReminderSet property as it is Boolean and a dropdown control for ReminderTimeBeforeStart to select the Timespan.​



    I hope it clears.​



    Thanks and Regards,​

    Prabhat Sharma.

  • Posted 16 July 2019, 11:08 pm EST

    Ok I get that but how does the Schedule control “know” that a reminder is set? What I am mapping my database fields to the control as follows:

        C1Schedule1.DataStorage.AppointmentStorage.DataSource = ScheduleTable
        C1Schedule1.DataStorage.AppointmentStorage.Mappings.IndexMapping.MappingName = "DealActivityID"
        C1Schedule1.DataStorage.AppointmentStorage.Mappings.Subject.MappingName = "ActivityType"
        C1Schedule1.DataStorage.AppointmentStorage.Mappings.Location.MappingName = "LocationName"
        C1Schedule1.DataStorage.AppointmentStorage.Mappings.Start.MappingName = "StartDate"
        C1Schedule1.DataStorage.AppointmentStorage.Mappings.End.MappingName = "DueDate"
        C1Schedule1.DataStorage.AppointmentStorage.Mappings.Body.MappingName = "Notes"
    

    I have a Boolean field in my database for reminder but I cannot find any sort of mapping similar to the above to set it up in the schedule control.

  • Posted 17 July 2019, 6:06 pm EST

    Hello,

    C1Schedule does not export the Reminder information to the separate fields.

    In the AppointmentMappingCollection you can find the “AppointmentProperties” property. It allows the other properties of the Appointment object like Reminder information to be bound to the appropriate field in the data source.

    In the appointments table, you should create a field ‘Properties’ which should be mapped to “AppointmentProperties” property of AppointmentMappingCollection. This field is a collection of many appointment properties including Reminder, in XML form.

    For more information, you can refer to the product sample named “C1ScheduleDemo” and check it’s Appointment mapping table and respective field in the Appointments table of C1NWind database.

    You can find the product sample and C1NWind database in your system at the given locations respectively :

    …\Documents\ComponentOne Samples\WinForms\C1Schedule\CS

    …\Documents\ComponentOne Samples\Common

    Kindly refer to the following link for more information :

    https://help.grapecity.com/componentone/NetHelp/c1schedule/webframe.html#C1.Win.C1Schedule.4~C1.C1Schedule.AppointmentMappingCollection_properties.html

    Thanks and Regards,

    Prabhat Sharma

  • Posted 18 July 2019, 4:35 am EST

    I seem to be striking out here. I looked at the samples and could not find any example of how to do this and the documentation says virtually nothing about it. All it seems to do is acknowledge that the AppointmentProperties property exists but gives not even a hint as to how to access or use it. Is there any printable documentation for this control?

  • Posted 18 July 2019, 11:10 pm EST

    Hi Mike,

    AppointmentProperties is not a property on Appointment object. It is a collection of properties which can be serialized/deserialized to/from XML string.

    As for binding Reminder property your XML string (which should be mapped to AppointmentProperties mapping object) should be:

    <AppointmentProps>
        <Reminder>
            <Set>True</Set>
            <NextReminderDate>07/20/2019 15:15:00</NextReminderDate>
        </Reminder>
    </AppointmentProps>
    

    Please refer to the attached sample for binding example.

    AppointmentReminder_DB.zip

    Also, the documentation for C1Schedule in only available online. [https://help.grapecity.com/componentone/NetHelp/c1schedule/webframe.html#componentoneschedulerforwinformsoverview.html]

    Regards,

    Jitender

  • Posted 18 July 2019, 11:18 pm EST

    Ok thanks for your reply. That is an extremely cumbersome and inconvenient way of handling it. I don’t really understand why they did not handle it like any other property. Instead of writing a single line of code, I have to go through all that XML stuff.

  • Posted 21 July 2019, 4:31 pm EST

    Hi Mike,

    Thanks for sharing your feedback. We’ve updated the developers with the same.

    Regards,

    Jitender

  • Posted 21 July 2019, 8:55 pm EST

    Hi Mike,

    The Reminder property of an Appointment (and other similar properties) are different from other properties. While properties like ‘Subject’, ‘Body’, etc. can be mapped directly to a column, properties like ‘Reminder’ are composite properties (comprising of Set [a bool] and a Reminder date) which cannot be easily mapped. This is why these properties are grouped under ‘AppointmentProperties’ which uses XML strings for binding.

    Once you bind these properties, C1Schedule would handle the retrieval and save operations so you don’t need to handle these operations yourself.

    Thanks,

    Jitender

  • Posted 25 July 2019, 5:03 am EST

    Thanks for your reply. I just don’t see why its difficult to have a Boolean property for “Reminder” and a date property for Reminder date/Time. Those could easily be mapped from a database. having to mess around with XML limits the usefulness of the control. To compound matters, the online documentation is makes It is very difficult to find any useful information aside from very basic cook-cutter scenarios. We are just skipping that feature for now as a result.

  • Posted 25 July 2019, 8:38 pm EST

    Hi,

    Using XML (instead of requiring users to have multiple specific columns) is more flexible. Also, you don’t need to write or handle any XML yourself, once the mappings are correctly set, the control saves these properties correctly.

    We’re sorry that you had to drop this feature because it is not suitable for you.

    If there is a specific use-case where you think that having separate properties (and mappings) would be more suitable then please share it so we can discuss it with the developers.

    About the issues with documentation, we’ve forwarded your feedback to the concerned team so that they can improve it.

    Regards,

    Jitender

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels