public override string ToString() { StringBuilder p = new StringBuilder(); p.AppendLine(Title); p.Append(Likes); p.Append("Likes - "); p.AppendLine(Momment.ToString("dd/MM/yyyy HH:mm:SS")); p.AppendLine("Comments: "); foreach (Comment c in Comments) { p.AppendLine(c.Text); } return(p.ToString()); }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendLine(Title); sb.Append(Likes); sb.Append(" Likes - "); sb.AppendLine(Momment.ToString("DD/MM/YYYY HH:mm:ss")); sb.AppendLine(Content); sb.AppendLine("Comments: "); foreach (Comment c in Comments) { sb.AppendLine(c.Text); } return(sb.ToString()); }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendLine("\n\nOrder Summary: "); sb.AppendLine("Order moment: " + Momment.ToString("dd/MM/yyyy HH:mm:ss")); sb.AppendLine("Order status: " + Status); sb.AppendFormat("Client: " + Clients.Name + " " + Clients.BirthDate.ToString("dd/MM/yyyy") + " - " + Clients.Email); sb.AppendLine("\nOrder items:"); foreach (OrderItem list in Items) { sb.AppendLine(list.Products.Name + ", $" + list.Price + ", Quantity: " + list.Quantity + ", SubTotal: " + list.SubTotal()); } sb.AppendLine("Total price: $" + Total()); return(sb.ToString()); }
public override string ToString() { StringBuilder text = new StringBuilder(); text.AppendLine("ORDER SUMMARY: "); text.AppendLine("Order Momment: " + Momment.ToString("MM/dd/yyyy")); text.AppendLine("Order Status:" + Status); text.AppendLine("Client: " + Client); text.AppendLine("Order Items: "); foreach (OrderItem ordit in Item) { text.Append(ordit.Product.Name + ", "); text.Append("Quantity: " + ordit.Quantity + ", "); text.AppendLine("Subtotal: $" + ordit.SubTotal().ToString("F2", invCult)); } return(text.ToString()); }
public override string ToString() { StringBuilder st = new StringBuilder(); st.AppendLine("ORDER SUMMARY:"); st.Append("Order moment: "); st.AppendLine(Momment.ToString("dd/MM/yyyy HH:mm:ss")); st.Append("Order Status: " + Status); st.Append("Client: " + Client); st.AppendLine("Order Items:"); foreach (OrderItem Its in OrderItems) { st.Append(Its.Product + "," + Its.Price + ", Qunatity: " + Its.Quantity + ", SubTotal: $" + Its.SubTotal()); } return(st.ToString()); }