public OrderDialogItemTO(OrderDialogItem mdo) { this.sequenceNumber = mdo.SequenceNumber; this.dataType = mdo.DataType; this.domain = mdo.Domain; this.displayText = mdo.DisplayText; this.orderableItemId = mdo.OrderableItemId; }
internal List<OrderDialogItem> dialogItemsToMdo(string response) { if (String.IsNullOrEmpty(response)) { return null; } string[] lines = StringUtils.split(response, StringUtils.CRLF); List<OrderDialogItem> result = new List<OrderDialogItem>(); for (int i = 0; i < lines.Length; i++) { if (String.IsNullOrEmpty(lines[i])) { continue; } string[] flds = StringUtils.split(lines[i], StringUtils.CARET); OrderDialogItem item = new OrderDialogItem(); // check for integer sequence # item.SequenceNumber = Convert.ToInt16(flds[0]); item.DataType = flds[1][0]; item.Domain = flds[1].Substring(2); item.DisplayText = flds[2]; item.OrderableItemId = flds[3]; result.Add(item); } return result; }