protected override void BeforeReadIDOs(int index) { base.BeforeReadIDOs(index); try { if (index == 1) { IDOPurchaseOrderLines poLines = (IDOPurchaseOrderLines)GetSecondObject(index); poLines.parm.PropertyList = "PoNum"; SetAdapterLists(1, "PoLine", "PoLine", ValueTypes.String, GetString(Resource.String.OrderLine) + GetString(Resource.String.Line0), Resource.Layout.CommonSubSplitterViewer); SetAdapterLists(1, "Item", "Item", ValueTypes.String, GetString(Resource.String.Item), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(1, "Description", "Description", ValueTypes.String, GetString(Resource.String.Description), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(1, "QtyOrderedConv", "QtyOrderedConv", ValueTypes.Decimal, GetString(Resource.String.Quantity), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(1, "DerQtyReceivedConv", "DerQtyReceivedConv", ValueTypes.Decimal, GetString(Resource.String.QuantityReceived), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(1, "UM", "UM", ValueTypes.String, GetString(Resource.String.UM), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(1, "Stat", "Stat", ValueTypes.String, GetString(Resource.String.Status), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(1, "DueDate", "DueDate", ValueTypes.Date, GetString(Resource.String.DueDate), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(1, "PromiseDate", "PromiseDate", ValueTypes.Date, GetString(Resource.String.PromiseDate), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(1, "Whse", "Whse", ValueTypes.String, GetString(Resource.String.General), Resource.Layout.CommonSubLabelTextViewer); poLines.BuilderFilterByPoNum(Intent.GetStringExtra("PoNum")); poLines.parm.RecordCap = -1; poLines.SetOrderBy("PoLine"); } } catch (Exception Ex) { throw Ex; } }
protected override string GetPropertyDisplayedValue(BaseBusinessObject obj, int objIndex, string name, int row) { string value = ""; switch (objIndex) { case 0: IDOPurchaseOrders POs = (IDOPurchaseOrders)PrimaryBusinessObject; value = POs.GetPropertyDisplayedValue(name, row); break; case 1: IDOPurchaseOrderLines poLines = (IDOPurchaseOrderLines)GetSecondObject(objIndex); value = poLines.GetPropertyDisplayedValue(name, row); break; default: break; } return(value); }