private async Task Delete(MobileServiceTableQueryDescription query) { await this.store.DeleteAsync(query); OperationsInfo operationsInfo = this.operationsInfo.Value; Interlocked.Decrement(ref operationsInfo.Count); }
private void bInfoOperation_Click(object sender, RoutedEventArgs e) { try { int trainId = logicEditor.getTrainId((OperationsView)lvTrains.SelectedItem); OperationsInfo op = new OperationsInfo(trainId, logicEditor.getOperations(trainId)); op.ShowDialog(); lvTrains.SelectedItem = null; } catch (Exception ex) { MessageBox.Show(ex.Message, "Ошибка БД", MessageBoxButton.OK, MessageBoxImage.Error); } }
public async Task EnqueueAsync(IMobileServiceFileOperation operation) { OperationsInfo operationsInfo = this.operationsInfo.Value; var operationItem = new FileOperationItem { FileId = operation.FileId, Id = operation.Id, Kind = operation.Kind, Sequence = Interlocked.Increment(ref operationsInfo.Sequence) }; await this.store.UpsertAsync(FileOperationTableName, new[] { operationItem.ToJsonObject() }, ignoreMissingColumns : false); Interlocked.Increment(ref operationsInfo.Count); }