Ejemplo n.º 1
0
        private string BuildSubtitle()
        {
            string dateFormat = "dd.MM.yyyy HH:mm";

            StringBuilder text = new StringBuilder("Период: ");

            text.Append(DateFrom.ToString(dateFormat) + " - ");
            text.Append(DateTo.ToString(dateFormat));

            text.Append(", подразделение: ");
            text.Append(SelectedUnit.Name);

            if (LicensePlate.Trim().Length > 0)
            {
                text.Append(", номер т/с: ");
                text.Append(LicensePlate.Trim());
            }

            if (Cargo.Trim().Length > 0)
            {
                text.Append(", груз: ");
                text.Append(Cargo.Trim());
            }

            return(text.ToString());
        }