/// <summary> /// This method fetches the most recent 100 measurements for the selected part. Please have a look at the other properties inside /// the filter class to understand all possibilities of filtering. /// </summary> private async Task updateMeasurements2CheckDemoReport(PathInformation partPath, string serialNumber) { SimpleMeasurement[] _Measurements = new SimpleMeasurement[0]; try { var sw = System.Diagnostics.Stopwatch.StartNew(); _Measurements = (await _RestDataServiceClient.GetMeasurements(partPath, new MeasurementFilterAttributes { SearchCondition = new GenericSearchAttributeCondition { Attribute = (ushort)14, Operation = Operation.Equal, Value = serialNumber } })).ToArray();// sw.Stop(); foreach (var mes in _Measurements) { mes.SetAttribute((ushort)20057, "已完成"); } if (_Measurements.Count() > 0) { await _RestDataServiceClient.UpdateMeasurements(_Measurements); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }