示例#1
0
        public static void SyncList(Guid listId)
        {
            var configProvider = new RosterConfigService();
            var mappingSetting = configProvider.GetMappingByList(listId.ToString());

            if (mappingSetting == null)
            {
                return;
            }
            var dataProvider = new RosterDataService();
            {
                var list      = SPContext.Current.SPList(listId);
                var listitems = list.ListItems(mappingSetting.Key,
                                               String.Join("$", mappingSetting.ListMappingFields.Select(item => item.ItemName).ToList()), true);

                dataProvider.SaveRows(mappingSetting, listitems);
            }
        }