Exemple #1
0
 private void DataPortal_Fetch(Paging page)
 {
     using (var ctx = ContextManager <EFDataContext> .GetManager(Database.EFramework))
     {
         var i = (from p in ctx.DataContext.SM_ConfBill
                  select SM_ConfBillFactory.Fetch(p)).Skip(page.StartIndex).Take(page.RowCount);
         this.RaiseListChangedEvents = false;
         this.IsReadOnly             = false;
         this.AddRange(i);
         this.IsReadOnly             = true;
         this.RaiseListChangedEvents = true;
     }
 }
Exemple #2
0
        private void DataPortal_Fetch()
        {
            using (var ctx = ContextManager <EFDataContext> .GetManager(Database.EFramework))
            {
                var i = from p in ctx.DataContext.SM_ConfBill
                        select SM_ConfBillFactory.Fetch(p);

                this.RaiseListChangedEvents = false;
                this.IsReadOnly             = false;
                this.AddRange(i);
                this.IsReadOnly             = true;
                this.RaiseListChangedEvents = true;
            }
        }
Exemple #3
0
        private void DataPortal_Fetch(Common.Business.LambdaExpression lambda)
        {
            using (var ctx = ContextManager <EFDataContext> .GetManager(Database.EFramework))
            {
                var exp = lambda.Resolve <SM_ConfBill>();
                var i   = from p in ctx.DataContext.SM_ConfBill.Where(exp)
                          select SM_ConfBillFactory.Fetch(p);

                this.RaiseListChangedEvents = false;
                this.IsReadOnly             = false;
                this.AddRange(i);
                this.IsReadOnly             = true;
                this.RaiseListChangedEvents = true;
            }
        }