public PricerDestFinalCollection FetchAll()
 {
     PricerDestFinalCollection coll = new PricerDestFinalCollection();
     Query qry = new Query(PricerDestFinal.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
예제 #2
0
    //end bind combo

    /// <summary>
    /// databind final destination list when country is selected
    /// </summary>
    protected void bind_cbo_final(string countryid)
    {
        //check origin
        int _countryid = wwi_func.vint(countryid);

        if (_countryid > 0)
        {
            Query _qry = new Query(DAL.Pricer.Tables.PricerDestFinal, "pricerprov").AddWhere("dest_country_id", Comparison.Equals, _countryid).ORDER_BY("dest_final", "asc");
            PricerDestFinalCollection _final = new PricerDestFinalCollection();
            _final.LoadAndCloseReader(_qry.ExecuteReader());

            DataTable _dt = (DataTable)_final.ToDataTable();
            this.dxcbfinal.DataSource = _dt;
            this.dxcbfinal.ValueField = "dest_final_id";
            this.dxcbfinal.TextField  = "dest_final";
            this.dxcbfinal.DataBind();
        }
    }
    //end bind combo

    /// <summary>
    /// databind final destination list when country is selected 
    /// </summary>
    protected void bind_cbo_final(string countryid)
    {
        //check origin
        int _countryid = wwi_func.vint(countryid);

        if (_countryid > 0)
        {
            Query _qry = new Query(DAL.Pricer.Tables.PricerDestFinal, "pricerprov").AddWhere("dest_country_id", Comparison.Equals, _countryid).ORDER_BY("dest_final", "asc");
            PricerDestFinalCollection _final = new PricerDestFinalCollection();
            _final.LoadAndCloseReader(_qry.ExecuteReader());

            DataTable _dt = (DataTable)_final.ToDataTable();
            this.dxcbfinal.DataSource = _dt;
            this.dxcbfinal.ValueField = "dest_final_id";
            this.dxcbfinal.TextField = "dest_final";
            this.dxcbfinal.DataBind();
        }
    }
 public PricerDestFinalCollection FetchByQuery(Query qry)
 {
     PricerDestFinalCollection coll = new PricerDestFinalCollection();
     coll.LoadAndCloseReader(qry.ExecuteReader()); 
     return coll;
 }
 public PricerDestFinalCollection FetchByID(object DestFinalId)
 {
     PricerDestFinalCollection coll = new PricerDestFinalCollection().Where("dest_final_ID", DestFinalId).Load();
     return coll;
 }