internal void Update(RevisionMaterial parent)
        {
            // if we're not dirty then don't update the database
            if (!this.IsDirty)
            {
                return;
            }

            OidRevision = parent.Oid;

            try
            {
                ValidationRules.CheckRules();

                if (!IsValid)
                {
                    throw new iQValidationException(moleQule.Library.Resources.Messages.GENERIC_VALIDATION_ERROR);
                }

                Material_PlanRecord obj = parent.Session().Get <Material_PlanRecord>(Oid);
                obj.CopyValues(this.Base.Record);
                parent.Session().Update(obj);
            }
            catch (Exception ex)
            {
                iQExceptionHandler.TreatException(ex);
            }

            MarkOld();
        }
        public virtual void CopyValues(Material_PlanRecord source)
        {
            if (source == null)
            {
                return;
            }

            Oid           = source.Oid;
            _oid_modulo   = source.OidModulo;
            _oid_material = source.OidMaterial;
            _oid_revision = source.OidRevision;
        }