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

            _base.Record.OidEmpresa = parent.Oid;

            try
            {
                ValidationRules.CheckRules();

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

                CompanyContactRecord obj = parent.Session().Get <CompanyContactRecord>(Oid);
                obj.CopyValues(this._base.Record);
                parent.Session().Update(obj);
            }
            catch (Exception ex)
            {
                throw new iQPersistentException(iQExceptionHandler.GetAllMessages(ex));
            }

            MarkOld();
        }
Exemple #2
0
        public virtual void CopyValues(CompanyContactRecord source)
        {
            if (source == null)
            {
                return;
            }

            Oid          = source.Oid;
            _oid_empresa = source.OidEmpresa;
            _cargo       = source.Cargo;
            _nombre      = source.Nombre;
            _dni         = source.Dni;
            _direccion   = source.Direccion;
            _cod_postal  = source.CodPostal;
            _municipio   = source.Municipio;
            _provincia   = source.Provincia;
            _telefonos   = source.Telefonos;
        }