IsAutoIdFieldConverter.cs
890 字节
using BLL;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace SmartScan.SetControl.WPF.Convent
{
public class IsAutoIdFieldConverter: IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is string fieldName)
{
// 检查字段名是否为当前设置的自增ID字段
return fieldName == BLLCommon.config.ReelIDKeyWord && !string.IsNullOrEmpty(BLLCommon.config.ReelIDKeyWord);
}
return false;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}