private HostedOrderRowBuilder GetNewTempRow(IRowBuilder row, string sku) { var tempRow = new HostedOrderRowBuilder(); if (row.GetName() != null) { tempRow.SetName(row.GetName()); } if (row.GetDescription() != null) { tempRow.SetDescription(row.GetDescription()); } tempRow.SetQuantity(1); tempRow.SetUnit(row.GetUnit()); tempRow.SetSku(sku); return(tempRow); }
private OrderRow NewRowBasedOnExisting(IRowBuilder existingRow) { var newOrderRow = new OrderRow(); newOrderRow = SerializeOrder(existingRow.GetArticleNumber(), existingRow.GetDescription(), existingRow.GetName(), existingRow.GetUnit(), newOrderRow); newOrderRow.DiscountPercent = existingRow.GetDiscountPercent(); newOrderRow.NumberOfUnits = existingRow.GetQuantity(); return(newOrderRow); }
private static string FormatDiscountDescription(IRowBuilder row) { return(string.Format(row.GetName() != null && row.GetName().Length > 0 ? "{0}: {1} ({2}%)" : "{1} ({2}%)", row.GetName(), row.GetDescription(), (int)row.GetVatPercent().GetValueOrDefault())); }
private static string FormatDescription(IRowBuilder row) { return(string.Format(row.GetName() != null && row.GetName().Length > 0 ? "{0}: {1}" : "{1}", row.GetName(), row.GetDescription())); }