Exemplo n.º 1
0
 /**
  *  After Save
  *	@param newRecord new
  *	@param success success
  *	@return success
  */
 protected override bool AfterSave(bool newRecord, bool success)
 {
     //	Product Line was changed
     if (newRecord || Is_ValueChanged("M_ProductBOM_ID"))
     {
         //	Invalidate BOM
         MProduct product = new MProduct(GetCtx(), GetM_Product_ID(), Get_TrxName());
         if (Get_TrxName() != null)
         {
             product.Load(Get_TrxName());
         }
         if (product.IsVerified())
         {
             product.SetIsVerified(false);
             product.Save(Get_TrxName());
         }
         //	Invalidate Products where BOM is used
     }
     return(success);
 }
Exemplo n.º 2
0
 /// <summary>
 /// After Save
 /// </summary>
 /// <param name="newRecord"></param>
 /// <param name="success"></param>
 /// <returns>success</returns>
 /// <writer>raghu</writer>
 /// <date>08-march-2011</date>
 protected override Boolean AfterSave(Boolean newRecord, Boolean success)
 {
     //	BOM Component Line was changed
     if (newRecord || Is_ValueChanged("M_ProductBOM_ID") || Is_ValueChanged("M_ProductBOMVersion_ID") || Is_ValueChanged("IsActive"))
     {
         MBOM mbom = new MBOM(GetCtx(), GetM_BOM_ID(), Get_Trx());
         //	Invalidate BOM
         MProduct product = new MProduct(GetCtx(), mbom.GetM_Product_ID(), Get_Trx());
         if (Get_Trx() != null)
         {
             product.Load(Get_Trx());
         }
         if (product.IsVerified())
         {
             product.SetIsVerified(false);
             product.Save(Get_Trx());
         }
         //	Invalidate Products where BOM is used
     }
     return(success);
 }