Beispiel #1
0
        /*	Set Expense Type
         *	@param parent expense type
         *	@return true if changed
         */
        public bool SetExpenseType(MExpenseType parent)
        {
            bool changed = false;

            if (!PRODUCTTYPE_ExpenseType.Equals(GetProductType()))
            {
                SetProductType(PRODUCTTYPE_ExpenseType);
                changed = true;
            }
            if (parent.GetS_ExpenseType_ID() != GetS_ExpenseType_ID())
            {
                SetS_ExpenseType_ID(parent.GetS_ExpenseType_ID());
                changed = true;
            }
            if (parent.IsActive() != IsActive())
            {
                SetIsActive(parent.IsActive());
                changed = true;
            }
            //
            if (!parent.GetValue().Equals(GetValue()))
            {
                SetValue(parent.GetValue());
                changed = true;
            }
            if (!parent.GetName().Equals(GetName()))
            {
                SetName(parent.GetName());
                changed = true;
            }
            if ((parent.GetDescription() == null && GetDescription() != null) ||
                (parent.GetDescription() != null && !parent.GetDescription().Equals(GetDescription())))
            {
                SetDescription(parent.GetDescription());
                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);
        }
Beispiel #2
0
 /**
  *  Parent Constructor
  *	@param et parent
  */
 public MProduct(MExpenseType et)
     : this(et.GetCtx(), 0, et.Get_TrxName())
 {
     SetProductType(X_M_Product.PRODUCTTYPE_ExpenseType);
     SetExpenseType(et);
 }