コード例 #1
0
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string typeName = value.ToString();

            return(CompanyType.getCompanyTypes(typeName).FirstOrDefault().ID);
        }
コード例 #2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            int companyType = (int)value;

            return(CompanyType.getCompanyTypes(companyType).FirstOrDefault().TypeName);
        }