Beispiel #1
0
        /// <summary>This method builds the SQL statement to edit the instance in database</summary>
        /// <param name="instance">This parameter represents the instance to be modified in the database</param>
        public override void UpdateEdited(ONInstance instance)
        {
            RevisionInstance lInstance = instance as RevisionInstance;

            ONSqlUpdate lOnSql = new ONSqlUpdate();

            lOnSql.AddUpdate(CtesBD.TBL_REVISION);
            // Field 'id_RevisarAeronave'
            // Update not needed (OID)
            lOnSql.AddSet(CtesBD.FLD_REVISION_ESTADOOBJ, lInstance.StateObj);
            lOnSql.AddSet(CtesBD.FLD_REVISION_FUM, new ONDateTime(DateTime.Now));
            // Field 'NombreRevisor'
            if (lInstance.NombreRevisorAttrModified)
            {
                lOnSql.AddSet(CtesBD.FLD_REVISION_NOMBREREVISOR, lInstance.NombreRevisorAttr);
            }
            // Field 'FechaRevision'
            if (lInstance.FechaRevisionAttrModified)
            {
                lOnSql.AddSet(CtesBD.FLD_REVISION_FECHAREVISION, lInstance.FechaRevisionAttr);
            }
            // Field 'Id_Aeronave'
            if (lInstance.Id_AeronaveAttrModified)
            {
                lOnSql.AddSet(CtesBD.FLD_REVISION_ID_AERONAVE, lInstance.Id_AeronaveAttr);
            }

            lOnSql.AddWhere(CtesBD.FLD_REVISION_ID_REVISARAERONAVE, lInstance.Oid.Id_RevisarAeronaveAttr);
            Execute(lOnSql);
        }
        /// <summary>This method builds the SQL statement to edit the instance in database</summary>
        /// <param name="instance">This parameter represents the instance to be modified in the database</param>
        public override void UpdateEdited(ONInstance instance)
        {
            AeronaveInstance lInstance = instance as AeronaveInstance;

            ONSqlUpdate lOnSql = new ONSqlUpdate();

            lOnSql.AddUpdate(CtesBD.TBL_AERONAVE);
            // Field 'id_Aeronave'
            // Update not needed (OID)
            lOnSql.AddSet(CtesBD.FLD_AERONAVE_ESTADOOBJ, lInstance.StateObj);
            lOnSql.AddSet(CtesBD.FLD_AERONAVE_FUM, new ONDateTime(DateTime.Now));
            // Field 'Nombre'
            if (lInstance.NombreAttrModified)
            {
                lOnSql.AddSet(CtesBD.FLD_AERONAVE_NOMBRE, lInstance.NombreAttr);
            }
            // Field 'MaximoPasajeros'
            if (lInstance.MaximoPasajerosAttrModified)
            {
                lOnSql.AddSet(CtesBD.FLD_AERONAVE_MAXIMOPASAJEROS, lInstance.MaximoPasajerosAttr);
            }
            // Field 'Origen'
            if (lInstance.OrigenAttrModified)
            {
                lOnSql.AddSet(CtesBD.FLD_AERONAVE_ORIGEN, lInstance.OrigenAttr);
            }
            // Field 'Destino'
            if (lInstance.DestinoAttrModified)
            {
                lOnSql.AddSet(CtesBD.FLD_AERONAVE_DESTINO, lInstance.DestinoAttr);
            }

            lOnSql.AddWhere(CtesBD.FLD_AERONAVE_ID_AERONAVE, lInstance.Oid.Id_AeronaveAttr);
            Execute(lOnSql);
        }
        public void PasajeroAeronaveRoleInsert(AeronaveOid localOid, PasajeroAeronaveOid relatedOid)
        {
            ONSqlUpdate lOnSql = new ONSqlUpdate();

            lOnSql.AddUpdate(CtesBD.TBL_PASAJEROAERONAVE);
            lOnSql.AddSet(CtesBD.FLD_PASAJEROAERONAVE_FK_AERONAVE_1, localOid.Id_AeronaveAttr);
            lOnSql.AddWhere(CtesBD.FLD_PASAJEROAERONAVE_ID_PASAJEROAERONAVE, relatedOid.Id_PasajeroAeronaveAttr);
            Execute(lOnSql);
        }
Beispiel #4
0
        public void RevisionPasajeroRoleInsert(RevisionOid localOid, RevisionPasajeroOid relatedOid)
        {
            ONSqlUpdate lOnSql = new ONSqlUpdate();

            lOnSql.AddUpdate(CtesBD.TBL_REVISIONPASAJERO);
            lOnSql.AddSet(CtesBD.FLD_REVISIONPASAJERO_FK_REVISION_1, localOid.Id_RevisarAeronaveAttr);
            lOnSql.AddWhere(CtesBD.FLD_REVISIONPASAJERO_ID_REVISIONPASAJERO, relatedOid.Id_RevisionPasajeroAttr);
            Execute(lOnSql);
        }
        public void PasajeroAeronaveRoleDelete(AeronaveOid oid)
        {
            ONSqlUpdate lOnSql = new ONSqlUpdate();

            lOnSql.AddUpdate(CtesBD.TBL_PASAJEROAERONAVE);
            lOnSql.AddSet(CtesBD.FLD_PASAJEROAERONAVE_FK_AERONAVE_1, ONInt.Null);
            lOnSql.AddWhere(CtesBD.FLD_PASAJEROAERONAVE_FK_AERONAVE_1, oid.Id_AeronaveAttr);

            Execute(lOnSql);
        }
Beispiel #6
0
        public void RevisionPasajeroRoleDelete(RevisionOid oid)
        {
            ONSqlUpdate lOnSql = new ONSqlUpdate();

            lOnSql.AddUpdate(CtesBD.TBL_REVISIONPASAJERO);
            lOnSql.AddSet(CtesBD.FLD_REVISIONPASAJERO_FK_REVISION_1, ONInt.Null);
            lOnSql.AddWhere(CtesBD.FLD_REVISIONPASAJERO_FK_REVISION_1, oid.Id_RevisarAeronaveAttr);

            Execute(lOnSql);
        }
Beispiel #7
0
        /// <summary>This method builds the SQL statement to edit the instance in database</summary>
        /// <param name="instance">This parameter represents the instance to be modified in the database</param>
        public override void UpdateEdited(ONInstance instance)
        {
            AdministradorInstance lInstance = instance as AdministradorInstance;

            ONSqlUpdate lOnSql = new ONSqlUpdate();

            lOnSql.AddUpdate(CtesBD.TBL_ADMINISTRADOR);
            // Field 'id_Administrador'
            // Update not needed (OID)
            // Field 'PassWord'
            if (lInstance.PassWordAttrModified)
            {
                lOnSql.AddSet(CtesBD.FLD_ADMINISTRADOR_PASSWORD, lInstance.PassWordAttr);
            }
            lOnSql.AddSet(CtesBD.FLD_ADMINISTRADOR_ESTADOOBJ, lInstance.StateObj);
            lOnSql.AddSet(CtesBD.FLD_ADMINISTRADOR_FUM, new ONDateTime(DateTime.Now));

            lOnSql.AddWhere(CtesBD.FLD_ADMINISTRADOR_ID_ADMINISTRADOR, lInstance.Oid.Id_AdministradorAttr);
            Execute(lOnSql);
        }
        /// <summary>This method builds the SQL statement to edit the instance in database</summary>
        /// <param name="instance">This parameter represents the instance to be modified in the database</param>
        public override void UpdateEdited(ONInstance instance)
        {
            NaveNodrizaInstance lInstance = instance as NaveNodrizaInstance;

            ONSqlUpdate lOnSql = new ONSqlUpdate();

            lOnSql.AddUpdate(CtesBD.TBL_NAVENODRIZA);
            // Field 'id_NaveNodriza'
            // Update not needed (OID)
            lOnSql.AddSet(CtesBD.FLD_NAVENODRIZA_ESTADOOBJ, lInstance.StateObj);
            lOnSql.AddSet(CtesBD.FLD_NAVENODRIZA_FUM, new ONDateTime(DateTime.Now));
            // Field 'Nombre_NaveNodriza'
            if (lInstance.Nombre_NaveNodrizaAttrModified)
            {
                lOnSql.AddSet(CtesBD.FLD_NAVENODRIZA_NOMBRE_NAVENODRIZA, lInstance.Nombre_NaveNodrizaAttr);
            }

            lOnSql.AddWhere(CtesBD.FLD_NAVENODRIZA_ID_NAVENODRIZA, lInstance.Oid.Id_NaveNodrizaAttr);
            Execute(lOnSql);
        }
        /// <summary>This method builds the SQL statement to edit the instance in database</summary>
        /// <param name="instance">This parameter represents the instance to be modified in the database</param>
        public override void UpdateEdited(ONInstance instance)
        {
            PasajeroInstance lInstance = instance as PasajeroInstance;

            ONSqlUpdate lOnSql = new ONSqlUpdate();

            lOnSql.AddUpdate(CtesBD.TBL_PASAJERO);
            // Field 'id_Pasajero'
            // Update not needed (OID)
            lOnSql.AddSet(CtesBD.FLD_PASAJERO_ESTADOOBJ, lInstance.StateObj);
            lOnSql.AddSet(CtesBD.FLD_PASAJERO_FUM, new ONDateTime(DateTime.Now));
            // Field 'Nombre'
            if (lInstance.NombreAttrModified)
            {
                lOnSql.AddSet(CtesBD.FLD_PASAJERO_NOMBRE, lInstance.NombreAttr);
            }

            lOnSql.AddWhere(CtesBD.FLD_PASAJERO_ID_PASAJERO, lInstance.Oid.Id_PasajeroAttr);
            Execute(lOnSql);
        }