Exemple #1
0
 public override StringBuilder generateBaseToString()
 {
     return(new StringBuilder()
            .Append(Quantity)
            .Append(AddWhiteSpaceIfNotBlank(true,
                                            QuantityMultiplier,
                                            Description,
                                            PharmaceuticalIndustry,
                                            Name,
                                            Dose.ToString(),
                                            Unity,
                                            At)));
 }
Exemple #2
0
        /// <summary>
        /// Gets a string representation of the medication.
        /// </summary>
        ///
        /// <returns>
        /// A string representation of the medication.
        /// </returns>
        ///
        public override string ToString()
        {
            StringBuilder result = new StringBuilder(200);

            result.Append(Name);

            if (GenericName != null)
            {
                result.Append(" ");
                result.AppendFormat(
                    Resources.MedicationToStringFormatGenericName,
                    GenericName.ToString());
            }

            if (Strength != null)
            {
                result.AppendFormat(
                    Resources.ListFormat,
                    Strength.ToString());
            }

            if (Dose != null)
            {
                result.AppendFormat(
                    Resources.ListFormat,
                    Dose.ToString());
            }

            if (Frequency != null)
            {
                result.Append(" ");
                result.Append(Frequency);
            }

            return(result.ToString());
        }