Ejemplo n.º 1
0
        /// <summary>Load the data retrieved from the Data Base to components of the application</summary>
        /// <param name="onContext">This parameter has the current context</param>
        /// <param name="oid">OID of the instance whose text attribute value is wanted to be loaded</param>
        public static ONText LoadTextNombre(ONContext onContext, AeronaveOid oid)
        {
            ONSqlSelect lOnSql = new ONSqlSelect();

            lOnSql.CreateAlias(CtesBD.TBL_AERONAVE, null, "Aeronave");
            lOnSql.AddSelect(CtesBD.FLD_AERONAVE_NOMBRE);

            FixInstance(lOnSql, null, null, oid);

            // Create Data Component
            AeronaveData lData = new AeronaveData(onContext);

            // Execute query
            ArrayList lSqlParameters;
            ONText    lReturn = new ONText((string)lData.ExecuteScalar(lOnSql.GenerateSQL(out lSqlParameters), lSqlParameters));

            return(lReturn);
        }
Ejemplo n.º 2
0
        /// <summary>Load the data retrieved from the Data Base to components of the application</summary>
        /// <param name="onContext">This parameter has the current context</param>
        /// <param name="oid">OID of the instance whose text attribute value is wanted to be loaded</param>
        public static ONText LoadTextOrigen(ONContext onContext, AeronaveOid oid)
        {
            ONSqlSelect lOnSql = new ONSqlSelect();

            lOnSql.CreateAlias(CtesBD.TBL_AERONAVE, null, "Aeronave");
            lOnSql.AddSelect(CtesBD.FLD_AERONAVE_ORIGEN);

            FixInstance(lOnSql, null, null, oid);

            // Create Data Component
            AeronaveData lData = new AeronaveData(onContext);

            // Execute query
            ArrayList lSqlParameters;
            ONText lReturn = new ONText((string) lData.ExecuteScalar(lOnSql.GenerateSQL(out lSqlParameters), lSqlParameters));
            return lReturn;
        }