I am trying to do this check on the save_start of Work Order window.
Is there already a WorkOrder property/method that indicates allocations are incomplete?
Should I be checking Stages, InputItems, OutputItems, LineDetails, or some other collection?
Which property indicates that an allocation is still outstanding/unallocated?
A small code example would be greatly appreciated.
Thanks.
the code below is the skeleton i have so far
- Code: Select all
public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
{
if(JiwaForm is JiwaFinancials.Jiwa.JiwaBillOfMaterialsUI.WorkOrder.WorkOrder )
{
JiwaFinancials.Jiwa.JiwaBillOfMaterialsUI.WorkOrder.WorkOrder workOrderForm = (JiwaFinancials.Jiwa.JiwaBillOfMaterialsUI.WorkOrder.WorkOrder )JiwaForm;
workOrderForm.WorkOrder.SaveStart += WorkOrder_SaveStart;
}
}
private void WorkOrder_SaveStart(object sender, EventArgs e)
{
// works but count = 0
JiwaFinancials.Jiwa.JiwaBillOfMaterials.WorkOrder.WorkOrder workOrder =(JiwaFinancials.Jiwa.JiwaBillOfMaterials.WorkOrder.WorkOrder)sender;
foreach (JiwaFinancials.Jiwa.JiwaBillOfMaterials.WorkOrder.OutputItem outputItem in workOrder.OutputItems)
{
MessageBox.Show(
"Output Item: " + outputItem.ItemNo + Environment.NewLine +
"LineDetails Count: " +
outputItem.LineDetails.Count.ToString()); // no errors but gives a count = 0 which is not right ??
//break;
}
}


