public PricerOriginPointCollection FetchAll()
 {
     PricerOriginPointCollection coll = new PricerOriginPointCollection();
     Query qry = new Query(PricerOriginPoint.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
Exemplo n.º 2
0
    /// <summary>
    /// databind origins list
    /// </summary>
    protected void bind_cbo_origin()
    {
        Query _qry = new Query(DAL.Pricer.Tables.PricerOriginPoint, "pricerprov").AddWhere("origin_point_id", Comparison.GreaterThan, 0).ORDER_BY("origin_point", "asc");
        PricerOriginPointCollection _origins = new PricerOriginPointCollection();

        _origins.LoadAndCloseReader(_qry.ExecuteReader());

        DataTable _dt = (DataTable)_origins.ToDataTable();

        this.dxcborigin.DataSource = _dt;
        this.dxcborigin.ValueField = "origin_point_id";
        this.dxcborigin.TextField  = "origin_point";
        this.dxcborigin.DataBind();
    }
    /// <summary>
    /// databind origins list
    /// </summary>
    protected void bind_cbo_origin()
    {
        Query _qry = new Query(DAL.Pricer.Tables.PricerOriginPoint, "pricerprov").AddWhere("origin_point_id", Comparison.GreaterThan, 0).ORDER_BY("origin_point", "asc");
        PricerOriginPointCollection _origins = new PricerOriginPointCollection();
        _origins.LoadAndCloseReader(_qry.ExecuteReader());

        DataTable _dt = (DataTable)_origins.ToDataTable();
        this.dxcborigin.DataSource = _dt;
        this.dxcborigin.ValueField = "origin_point_id";
        this.dxcborigin.TextField = "origin_point";
        this.dxcborigin.DataBind();
    }
Exemplo n.º 4
0
    /// <summary>
    /// databind origins list
    /// this is called when country changed
    /// or
    /// cbfinal has focus AND no data items
    /// </summary>
    protected void bind_cbo_origin()
    {
        //get company group or default to 0
        Int32 _cg = check_group(); //wwi_func.get_company_group();
 
        Query _qry = new Query(DAL.Pricer.Tables.PricerOriginPoint, "pricerprov").AddWhere("origin_point_id", Comparison.GreaterThan, 0).AND("company_group", Comparison.Equals, _cg).ORDER_BY("origin_point", "asc");
        PricerOriginPointCollection _origins = new PricerOriginPointCollection();
        _origins.LoadAndCloseReader(_qry.ExecuteReader());
  
        DataTable _dt = (DataTable)_origins.ToDataTable();
        this.dxcborigin.DataSource = _dt;
        this.dxcborigin.ValueField = "origin_point_id";
        this.dxcborigin.TextField = "origin_point";
        this.dxcborigin.DataBind();
    }
 public PricerOriginPointCollection FetchByQuery(Query qry)
 {
     PricerOriginPointCollection coll = new PricerOriginPointCollection();
     coll.LoadAndCloseReader(qry.ExecuteReader()); 
     return coll;
 }
 public PricerOriginPointCollection FetchByID(object OriginPointId)
 {
     PricerOriginPointCollection coll = new PricerOriginPointCollection().Where("origin_point_ID", OriginPointId).Load();
     return coll;
 }