protected override void BeforeReadIDOs(int index) { base.BeforeReadIDOs(index); try { if (index == 1) { IDOItemLocs itemLoc = (IDOItemLocs)GetSecondObject(index); itemLoc.HideDuplcatedCol("Whse"); itemLoc.HideDuplcatedCol("WhsName"); itemLoc.HideDuplcatedCol("ItmwhseQtyOnHand"); itemLoc.parm.PropertyList = ""; SetAdapterLists(index, "Whse", "Whse", ValueTypes.String, GetString(Resource.String.Warehouse) + " - {0}", Resource.Layout.CommonSplitterViewer); SetAdapterLists(index, "WhsName", "WhsName", ValueTypes.String, GetString(Resource.String.WarehouseName)); SetAdapterLists(index, "ItmwhseQtyOnHand", "ItmwhseQtyOnHand", ValueTypes.Decimal, GetString(Resource.String.ItmwhseQtyOnHand)); SetAdapterLists(index, "Loc", "Loc", ValueTypes.String, GetString(Resource.String.Location) + " - {0}", Resource.Layout.CommonSubSplitterViewer); SetAdapterLists(index, "LocDescription", "LocDescription", ValueTypes.String, GetString(Resource.String.LocDescription), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(index, "LocType", "LocType", ValueTypes.String, GetString(Resource.String.LocType), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(index, "Rank", "Rank", ValueTypes.String, GetString(Resource.String.Rank), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(index, "ItmIssueBy", "ItmIssueBy", ValueTypes.String, GetString(Resource.String.ItmIssueBy), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(index, "QtyOnHand", "QtyOnHand", ValueTypes.Decimal, GetString(Resource.String.QtyOnHand), Resource.Layout.CommonSubLabelTextViewer); SetAdapterLists(index, "QtyRsvd", "QtyRsvd", ValueTypes.Decimal, GetString(Resource.String.QtyRsvd), Resource.Layout.CommonSubLabelTextViewer); itemLoc.BuilderFilterByItem(Intent.GetStringExtra("Item")); itemLoc.BuilderAdditionalFilter("QtyOnHand <> 0"); itemLoc.parm.RecordCap = -1; itemLoc.SetOrderBy("ItmwhseQtyOnHand DESC,QtyOnHand DESC,Rank"); } } catch (Exception Ex) { throw Ex; } }
protected override string GetPropertyDisplayedValue(BaseBusinessObject obj, int objIndex, string name, int row) { string value = ""; switch (objIndex) { case 0: IDOItems Items = (IDOItems)PrimaryBusinessObject; value = Items.GetPropertyDisplayedValue(name, row); break; case 1: IDOItemLocs itemLoc = (IDOItemLocs)GetSecondObject(objIndex); value = itemLoc.GetPropertyDisplayedValue(name, row); break; default: break; } return(value); }