예제 #1
0
        public static string GetMeasureUnitName(Guid unitsOfMeasureId, MeasureUnitName unitName)
        {
            MasterDataSet.UnitsOfMeasureRow row = GetMeasureUnitRow(unitsOfMeasureId);
            if (row == null)
            {
                return(string.Empty);
            }

            switch (unitName)
            {
            case MeasureUnitName.SingularName:
                return(row.SingularName);

            case MeasureUnitName.SingularAbbreviation:
                return(row.SingularAbbrv);

            case MeasureUnitName.SingularFullName:
                return(row.SingularFullName);

            case MeasureUnitName.PluralName:
                return(row.PluralName);

            case MeasureUnitName.PluralAbbreviation:
                return(row.PluralAbbrv);

            case MeasureUnitName.PluralFullName:
                return(row.PluralFullName);

            default:
                return(string.Empty);
            }
        }
예제 #2
0
 public static string GetMeasureUnitName(Guid measureUnitsId, MeasureUnitName unitName)
 {
     return(MeasureUnitsProvider.GetMeasureUnitName(measureUnitsId, unitName));
 }