Example #1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine($"Order Moment: {Moment.ToLongDateString()}");
            sb.AppendLine($"Order Status: {Status}");
            sb.AppendLine($"Client: {Client.Name}   ({Client.BirthDate.ToShortDateString()}) - {Client.Email}");
            sb.AppendLine("Order Items:");
            foreach (OrderItem o in OrderItem)
            {
                sb.AppendLine($"{o.Product.Name}, R${o.Price}, Quantity: {o.Quantity}, SubTotal: R${o.SubTotal().ToString("F2", CultureInfo.InvariantCulture)}");
            }
            return(sb.ToString());
        }
 public override string ToString()
 {
     return(Id + ", " + Moment.ToLongDateString() + ", " + Status);
 }