Exemplo n.º 1
0
        /// <summary>
        /// Overridden to provide string for email reports.
        /// </summary>
        /// <returns>Description of report.</returns>
        public override String ToString()
        {
            StringBuilder result = new StringBuilder();

            if (this.Product == null)
            {
                result.AppendLine("Full Report");
            }
            else if (this.File == null)
            {
                result.AppendLine("Product Report for: ");
                result.AppendLine(m_Product.ToString());
            }
            else if (this.TheEvent == null)
            {
                result.AppendLine("File Report for: ");
                result.AppendLine(Product.ToString());
                result.AppendLine(File.ToString());
            }
            else if (this.Cab == null)
            {
                result.AppendLine("Event Report for: ");
                result.AppendLine(Product.ToString());
                result.AppendLine(File.ToString());
                result.AppendLine(TheEvent.ToString());
            }
            else if (this.ScriptName == null)
            {
                result.AppendLine("Cab Report for: ");
                result.AppendLine(Product.ToString());
                result.AppendLine(File.ToString());
                result.AppendLine(TheEvent.ToString());
                result.AppendLine(Cab.ToString());
            }
            else
            {
                result.AppendLine("Script Report for: ");
                result.AppendLine(Product.ToString());
                result.AppendLine(File.ToString());
                result.AppendLine(TheEvent.ToString());
                result.AppendLine(Cab.ToString());
                result.AppendLine("Script: ");
                result.AppendLine(ScriptName);
            }

            return(result.ToString());
        }
Exemplo n.º 2
0
 public override string ToString()
 {
     return
         ($"{(Parution.DateDhl.HasValue ? Parution.DateDhl.Value.ToShortDateString() : "00/00/00")} - {Parution.CodeSérie}{(Parution.Numéro.HasValue ? Parution.Numéro.Value.ToString("#00") : "00")} - {Parution.Titre} : [{(Cab != null ? Cab.ToString() : "Pas de cab")}]");
 }