在Acumatica网格中添加额外的选择器窗口,需要使用以下代码:
protected void CustomFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { if (e.Row == null) return;
CustomFilter row = (CustomFilter) e.Row;
if (row.InventoryID != null)
{
InventoryItem item = PXSelect>>>.Select(this, row.InventoryID);
sender.SetValue(row, item.Descr);
sender.SetValue(row, item.ItemType);
sender.SetValue(row, item.ItemClassID);
}
}
public class CustomFilter : IBqlTable { #region InventoryID
public abstract class inventoryID : PX.Data.BQL.BqlInt.Field
{
}
[Inventory(DisplayName = "Inventory ID")]
public virtual int? InventoryID { get; set; }
#endregion InventoryID
#region ItemType
public abstract class itemType : PX.Data.BQL.BqlString.Field
{
}
[PXString]
[PXUIField(DisplayName = "Item Type")]
public virtual string ItemType { get; set; }
#endregion ItemType
#region ItemClass
public abstract class itemClass : PX.Data.BQL.BqlString.Field
{
}
[PXString]
[PXUIField(DisplayName = "Item Class")]
public virtual string ItemClass { get; set; }
#endregion ItemClass
#region ItemDescription
public abstract class itemDescription : PX.Data.BQL.BqlString.Field
{
}
[PXString]
[PXUIField(DisplayName = "Item Description")]
public virtual string ItemDescription { get; set; }
#endregion ItemDescription
}