public PricerDestCountryCollection FetchAll()
 {
     PricerDestCountryCollection coll = new PricerDestCountryCollection();
     Query qry = new Query(PricerDestCountry.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
示例#2
0
    //end bind combo
    /// <summary>
    /// databind country list when origin is selected
    /// </summary>
    protected void bind_cbo_country(string originid)
    {
        //check origin
        int _originid = wwi_func.vint(originid);

        if (_originid > 0)
        {
            Query _qry = new Query(DAL.Pricer.Tables.PricerDestCountry, "pricerprov").AddWhere("origin_point_id", Comparison.Equals, _originid).ORDER_BY("country_name", "asc");
            PricerDestCountryCollection _countries = new PricerDestCountryCollection();
            _countries.LoadAndCloseReader(_qry.ExecuteReader());

            DataTable _dt = (DataTable)_countries.ToDataTable();
            this.dxcbcountry.DataSource = _dt;
            this.dxcbcountry.ValueField = "country_id";
            this.dxcbcountry.TextField  = "country_name";
            this.dxcbcountry.DataBind();
        }
    }
    //end bind combo
    /// <summary>
    /// databind country list when origin is selected 
    /// </summary>
    protected void bind_cbo_country(string originid)
    {
        //check origin
        int _originid = wwi_func.vint(originid);

        if (_originid > 0)
        {
            Query _qry = new Query(DAL.Pricer.Tables.PricerDestCountry, "pricerprov").AddWhere("origin_point_id", Comparison.Equals, _originid).ORDER_BY("country_name", "asc");
            PricerDestCountryCollection _countries = new PricerDestCountryCollection();
            _countries.LoadAndCloseReader(_qry.ExecuteReader());

            DataTable _dt = (DataTable)_countries.ToDataTable();
            this.dxcbcountry.DataSource = _dt;
            this.dxcbcountry.ValueField = "country_id";
            this.dxcbcountry.TextField = "country_name";
            this.dxcbcountry.DataBind();

        }
    }
 public PricerDestCountryCollection FetchByQuery(Query qry)
 {
     PricerDestCountryCollection coll = new PricerDestCountryCollection();
     coll.LoadAndCloseReader(qry.ExecuteReader()); 
     return coll;
 }
 public PricerDestCountryCollection FetchByID(object DestCountryId)
 {
     PricerDestCountryCollection coll = new PricerDestCountryCollection().Where("dest_country_ID", DestCountryId).Load();
     return coll;
 }