Пример #1
0
        /**
         *  Set Resource Type
         *	@param parent resource type
         *	@return true if changed
         */
        public bool SetResource(MResourceType parent)
        {
            bool changed = false;

            if (PRODUCTTYPE_Resource.Equals(GetProductType()))
            {
                SetProductType(PRODUCTTYPE_Resource);
                changed = true;
            }
            //
            if (parent.GetC_UOM_ID() != GetC_UOM_ID())
            {
                SetC_UOM_ID(parent.GetC_UOM_ID());
                changed = true;
            }
            if (parent.GetM_Product_Category_ID() != GetM_Product_Category_ID())
            {
                SetM_Product_Category_ID(parent.GetM_Product_Category_ID());
                changed = true;
            }
            if (parent.GetC_TaxCategory_ID() != GetC_TaxCategory_ID())
            {
                SetC_TaxCategory_ID(parent.GetC_TaxCategory_ID());
                changed = true;
            }
            //
            return(changed);
        }
Пример #2
0
 /**
  *  Parent Constructor
  *	@param resource parent
  *	@param resourceType resource type
  */
 public MProduct(MResource resource, MResourceType resourceType)
     : this(resource.GetCtx(), 0, resource.Get_TrxName())
 {
     SetProductType(X_M_Product.PRODUCTTYPE_Resource);
     SetResource(resource);
     SetResource(resourceType);
 }