Пример #1
0
        private bool LoadByPrimaryKeyDynamic(System.Int32 orderID)
        {
            OrdersQuery query = new OrdersQuery();

            query.Where(query.OrderID == orderID);
            return(this.Load(query));
        }
Пример #2
0
        protected void InitQuery(OrdersQuery query)
        {
            query.OnLoadDelegate = this.OnQueryLoaded;

            if (!query.es2.HasConnection)
            {
                query.es2.Connection = ((IEntityCollection)this).Connection;
            }
        }
Пример #3
0
 public bool Load(OrdersQuery query)
 {
     this.query = query;
     InitQuery(this.query);
     return(Query.Load());
 }
        private void btnDynamicQuery_Click(object sender, EventArgs e)
        {
            btnAdd.Enabled = false;
            btnDelete.Enabled = false;
            btnSave.Enabled = false;

            EmployeesQuery eq = new EmployeesQuery("eq");
            OrdersQuery oq = new OrdersQuery("oq");

            eq.Select(eq.EmployeeID, eq.LastName, eq.FirstName, oq.OrderID, oq.ShipCity);
            eq.InnerJoin(oq).On(eq.EmployeeID == oq.EmployeeID);

            coll = new EmployeesCollection();
            coll.Load(eq);

            _bindingSource.DataSource = coll;
        }
Пример #5
0
 public OrdersQuery(string joinAlias, out OrdersQuery query)
 {
     query             = this;
     this.es.JoinAlias = joinAlias;
 }