diff --git a/Audit.csproj b/Audit.csproj index b2c4313..89e4732 100644 --- a/Audit.csproj +++ b/Audit.csproj @@ -166,6 +166,7 @@ + diff --git a/ConvertMoels/DeviationConvert.cs b/ConvertMoels/DeviationConvert.cs new file mode 100644 index 0000000..8dc99bb --- /dev/null +++ b/ConvertMoels/DeviationConvert.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace Audit.ConvertMoels +{ + internal class DeviationConvert : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + string a = System.Convert.ToString(values[0]); + string b = System.Convert.ToString(values[1]); + if (a != "" && b != "") + { + string c = (System.Convert.ToSingle(b) - System.Convert.ToSingle(a)).ToString("0.0"); + //string c = "0"; + return c; + } + return null; + } + + public object[] ConvertBack(object value, Type[] targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + + } +} diff --git a/View/QueryView.xaml b/View/QueryView.xaml index 845f916..1b1df9b 100644 --- a/View/QueryView.xaml +++ b/View/QueryView.xaml @@ -9,6 +9,7 @@ d:DesignHeight="900" d:DesignWidth="1140"> + @@ -93,7 +94,16 @@ - + + + + + + + + + +