You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
964 B
27 lines
964 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Text;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace BBWYB.Client.Converters
|
|
{
|
|
public class PurchaseOrderEditBtnConverter : IMultiValueConverter
|
|
{
|
|
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
bool.TryParse(values[0]?.ToString(), out bool isEdit);
|
|
int.TryParse(values[1]?.ToString(), out int purchaseQuantity);
|
|
int.TryParse(values[2]?.ToString(), out int remainingQuantity);
|
|
return !isEdit &&
|
|
purchaseQuantity != 0 &&
|
|
purchaseQuantity == remainingQuantity ? Visibility.Visible : Visibility.Collapsed;
|
|
}
|
|
|
|
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|
|
|