public override string ToString() { string productName = ProductName.PadRight(15); string latestPrice = String.Format("{0:C}", LatestPrice).PadRight(5); string quantity = String.Format("{0}", Quantity).PadRight(5); string total = String.Format("{0:C}", TotalOrder).PadLeft(15); return(string.Format("{0}\t{1}\t{2}\t{3}", productName, latestPrice, quantity, total)); }
public void WriteRecord(BinaryWriter writer) { writer.Write((int)RecordType); writer.Write(ProductName.PadRight(60, ' ').Substring(0, 60).ToCharArray()); writer.Write(LayoutCode); writer.Write(NominalCaseSize); writer.Write(Compressed ? 1 : 0); writer.Write(WeightIndex); writer.Write(CasesCount); writer.Write(Bias); writer.Write(CreationDate.Substring(0, 9).ToCharArray()); writer.Write(CreationTime.Substring(0, 8).ToCharArray()); writer.Write(FileLabel.PadRight(64, ' ').Substring(0, 64).ToCharArray()); writer.Write(new byte[3]); }
public override string ToString() { string result = ProductCode.PadRight(4); result += ProductName.PadRight(25); result += Price.ToString("C").PadLeft(6); result += " "; if (Quanity == 0) { result += "Sold Out!"; } else { result += Quanity.ToString().PadRight(10); } return(result); }
public override string ToString() { return($"{Id}: {ProductName.PadRight(35)}Quantity: {Quanity}\tPrice: {PriceInDollars:C}\tTheme: {Theme}"); }
public override string ToString() { return($"{Slot.PadRight(1)} - {ProductName.PadRight(20)} - {Quantity.ToString().PadRight(8)} - {Price:C} "); }