Beispiel #1
0
 void initLazyLoaders(bool newOrder)
 {
     _OemInfoLoader = new LazyLoader <OEMInfo>(() => OEMService.QueryOEMById(OEMID.Value));
     if (newOrder)
     {
         _applyformLoader    = new EnumerableLazyLoader <BaseApplyform>();
         _operationLoader    = new EnumerableLazyLoader <Log.Domain.OrderLog>();
         _coordinationLoader = new EnumerableLazyLoader <Coordination>();
     }
     else
     {
         _applyformLoader = new EnumerableLazyLoader <BaseApplyform>(() => {
             return(ApplyformQueryService.QueryApplyforms(this.Id));
         });
         _operationLoader = new EnumerableLazyLoader <Log.Domain.OrderLog>(() => {
             return(LogService.QueryOrderLog(this.Id));
         });
         _coordinationLoader = new EnumerableLazyLoader <Coordination>(() => {
             return(CoordinationService.QueryOrderCoordinations(this.Id));
         });
     }
     _associateOrderLoader   = new LazyLoader <Order>();
     _distributionBillLoader = new LazyLoader <Service.Distribution.Domain.OrderBill>(() => {
         return(DistributionQueryService.QueryOrderBill(this.Id));
     });
 }