string GetPileCrossSectionString(IPileProperty pileproperty) { if (pileCrossSectionDict.ContainsKey(pileproperty.GetType())) { string enumvalue = pileCrossSectionDict[pileproperty.GetType()].ToString(); FieldInfo fieldinfo = pileCrossSectionDict[pileproperty.GetType()].GetType().GetField(enumvalue); var displayattribute = fieldinfo.GetCustomAttribute <DisplayAttribute>(); if (displayattribute != null) { return(displayattribute.Name); } else { return(enumvalue); } } else { return("环形截面桩"); } }