예제 #1
0
        /// <summary>Obtains the last autonumeric that has the attribute id_NaveNodriza</summary>
        public ONInt GetAutonumericid_NaveNodriza()
        {
            ONSqlMax lOnSql = new ONSqlMax();
            string lAlias = lOnSql.CreateAlias(CtesBD.TBL_NAVENODRIZA, null, "NaveNodriza");
            lOnSql.AddSelect(lAlias, CtesBD.FLD_NAVENODRIZA_ID_NAVENODRIZA);

            object lRet = Execute(lOnSql);
            if (lRet is DBNull)
                return new ONInt(1);
            else
                return new ONInt(Convert.ToInt32(lRet) + 1);
        }
예제 #2
0
        /// <summary>Obtains the last autonumeric that has the attribute id_Aeronave</summary>
        public ONInt GetAutonumericid_Aeronave()
        {
            ONSqlMax lOnSql = new ONSqlMax();
            string lAlias = lOnSql.CreateAlias(CtesBD.TBL_AERONAVE, null, "Aeronave");
            lOnSql.AddSelect(lAlias, CtesBD.FLD_AERONAVE_ID_AERONAVE);

            object lRet = Execute(lOnSql);
            if (lRet is DBNull)
                return new ONInt(1);
            else
                return new ONInt(Convert.ToInt32(lRet) + 1);
        }
예제 #3
0
        /// <summary>Obtains the last autonumeric that has the attribute id_Pasajero</summary>
        public ONInt GetAutonumericid_Pasajero()
        {
            ONSqlMax lOnSql = new ONSqlMax();
            string lAlias = lOnSql.CreateAlias(CtesBD.TBL_PASAJERO, null, "Pasajero");
            lOnSql.AddSelect(lAlias, CtesBD.FLD_PASAJERO_ID_PASAJERO);

            object lRet = Execute(lOnSql);
            if (lRet is DBNull)
                return new ONInt(1);
            else
                return new ONInt(Convert.ToInt32(lRet) + 1);
        }