Best practise to refill C1Schedule

Posted by: SHanau on 2 March 2018, 4:31 am EST

    • Post Options:
    • Link

    Posted 2 March 2018, 4:31 am EST

    Hi,

    When I first load all of my appointsments (about 1.500) to C1Schedule it takes about 1 second to do so. But when I do it for a second time (in order in refresh C1Schedule to show appointments which might have been created by another workplace) it takes about 8 seconds. So what’s the best way to refresh a bound C1Schedule ?

    Here’s the code I created:

            // daten zu terminkalender mappen
    
            _mySchedule.BeginUpdate();
    
            // appointments
    
            _mySchedule.DataStorage.AppointmentStorage.Mappings.IndexMapping.MappingName = "app_lfd";
            _mySchedule.DataStorage.AppointmentStorage.Mappings.Subject.MappingName = "subject";
            _mySchedule.DataStorage.AppointmentStorage.Mappings.Location.MappingName = "location";
            _mySchedule.DataStorage.AppointmentStorage.Mappings.Start.MappingName = "startdate";
            _mySchedule.DataStorage.AppointmentStorage.Mappings.End.MappingName = "enddate";
            _mySchedule.DataStorage.AppointmentStorage.Mappings.Body.MappingName = "bemerkung";
            _mySchedule.DataStorage.AppointmentStorage.Mappings.AppointmentProperties.MappingName = "properties";
            _mySchedule.DataStorage.AppointmentStorage.Mappings.OwnerIndexMapping.MappingName = "gem_prax";
    
            // owner
    
            _mySchedule.DataStorage.OwnerStorage.Mappings.IndexMapping.MappingName = "gemprax";
            _mySchedule.DataStorage.OwnerStorage.Mappings.TextMapping.MappingName = "arztname";
    
            // categories
    
            _mySchedule.DataStorage.CategoryStorage.Mappings.IndexMapping.MappingName = "termin_lfd";
            _mySchedule.DataStorage.CategoryStorage.Mappings.TextMapping.MappingName = "bezeichnung";
            _mySchedule.DataStorage.CategoryStorage.Mappings.ColorMapping.MappingName = "farbe_argb";
    
            // labels
    
         _mySchedule.DataStorage.LabelStorage.Mappings.IndexMapping.MappingName = "termin_lfd";
            _mySchedule.DataStorage.LabelStorage.Mappings.TextMapping.MappingName = "bezeichnung";
            _mySchedule.DataStorage.LabelStorage.Mappings.ColorMapping.MappingName = "farbe_argb";
    
            // datasources
    
            _mySchedule.DataStorage.AppointmentStorage.DataSource = myDS.Tables[0];
            _mySchedule.DataStorage.OwnerStorage.DataMember = myDS.Tables[1].TableName;
            _mySchedule.DataStorage.OwnerStorage.DataSource = myDS.Tables[1];
            _mySchedule.DataStorage.CategoryStorage.DataMember = myDS.Tables[2].TableName;
            _mySchedule.DataStorage.CategoryStorage.DataSource = myDS.Tables[2];
            _mySchedule.DataStorage.LabelStorage.DataMember = myDS.Tables[2].TableName;
            _mySchedule.DataStorage.LabelStorage.DataSource = myDS.Tables[2];
    
            // mapping beenden
    
            _mySchedule.Refresh();
            _mySchedule.EndUpdate();
    

    Thanks in advance,

    Stephan

  • Posted 5 March 2018, 7:38 am EST

    Hello Stephan,

    You could use the RefreshData() method present inside _mySchedule.DataStorage.AppointmentStorage for refreshing the UI after adding or removing appointments.

    Also, one more thing I would suggest you: Try to add/remove appointments with _mySchedule.DataStorage.AppointmentStorage in your workplace that is adding/removing Appointments.

    Hope this helps.

    Thanks,

    Ruchir Agarwal

Need extra support?

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

Learn More

Forum Channels