/// <summary> /// Removed multiple items from your autocomplete. /// </summary> /// <param name="ItemsToRemove">The items to remove.</param> /// <param name="AutocompleteSection">The autocomplete section to remove from.</param> /// <returns>true if successful</returns> public bool RemoveBatch(IEnumerable<ListItem> Items, ListItemAutocompleteType AutocompleteSection) { return RemoveBatch(Items, StringEnum.GetStringValue(AutocompleteSection)); }
/// <summary> /// ProcessUpload /// </summary> /// <param name="atType"></param> private async Task<bool> ProcessUpload(ListItemAutocompleteType atType, bool updateExisting) { try { var datagridRows = dataGridViewCSVData.Rows.Cast<DataGridViewRow>(); var mappedElements = datagridRows.Select(dgr => RowToListItem(dgr)); if (updateExisting) return await m_constructorClient.AddOrUpdateBatchAsync(mappedElements, atType); else return await m_constructorClient.AddBatchAsync(mappedElements, atType); } catch (Exception ex) { MessageBox.Show(ex.ToString()); return false; } }
/// <summary> /// Adds or Updates multiple items in one batch. /// </summary> /// <param name="Items">The items to add or update.</param> /// <param name="AutocompleteSection">The section the items should be added to.</param> /// <returns>true if successful</returns> public async Task<bool> AddOrUpdateBatchAsync(IEnumerable<ListItem> Items, ListItemAutocompleteType AutocompleteSection) { return await AddOrUpdateBatchAsync(Items, StringEnum.GetStringValue(AutocompleteSection)); }