Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="personID"></param>
 /// <param name="q"></param>
 /// <param name="asRepo"></param>
 public static void getAssociated(int personID, ref IQueryable <Activity> q, IActivitySigninRepository asRepo)
 {
     q = from a in q
         join az in asRepo.GetAllQ() on a.ID equals az.activityID into g
         from f in g.DefaultIfEmpty()
         where f.personID == personID
         select a;
 }
 public ActivitySigninService(
     IActivitySigninRepository asiRepo,
     IWorkerService wServ,
     IPersonService pServ,
     IImageService iServ,
     IWorkerRequestService wrServ,
     IUnitOfWork uow,
     IMapper map,
     IConfigService cfg)
     : base(asiRepo, wServ, iServ, wrServ, uow, map, cfg)
 {
     this.logPrefix = "ActivitySignin";
     this.pServ     = pServ;
     this.asiRepo   = asiRepo;
 }
 public ActivitySigninService(
     IActivitySigninRepository asiRepo,
     IWorkerService wServ,
     IPersonService pServ,
     IImageService iServ,
     IWorkerRequestService wrServ,
     IUnitOfWork uow,
     IMapper map,
     IConfigService cfg,
     ITenantService tenantService
     ) : base(asiRepo, wServ, iServ, wrServ, uow, map, cfg)
 {
     this.logPrefix     = "ActivitySignin";
     this.pServ         = pServ;
     ClientTimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(tenantService.GetCurrentTenant().Timezone);
 }
Esempio n. 4
0
 public ReportService(IWorkOrderRepository woRepo,
                      IWorkAssignmentRepository waRepo,
                      IWorkerRepository wRepo,
                      IWorkerSigninRepository wsiRepo,
                      IWorkerRequestRepository wrRepo,
                      ILookupRepository lookRepo,
                      ILookupCache lookCache,
                      IEmployerRepository eRepo,
                      IActivitySigninRepository asRepo)
 {
     this.woRepo = woRepo;
     this.waRepo = waRepo;
     this.wRepo = wRepo;
     this.wsiRepo = wsiRepo;
     this.wrRepo = wrRepo;
     this.lookRepo = lookRepo;
     this.lookCache = lookCache;
     this.eRepo = eRepo;
     this.asRepo = asRepo;
 }
Esempio n. 5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="personID"></param>
 /// <param name="q"></param>
 /// <param name="asRepo"></param>
 public static void getUnassociated(int personID, ref IQueryable <Activity> q, IRepository <Activity> arepo, IActivitySigninRepository asRepo)
 {
     //
     //SELECT extent1.* FROM  [dbo].[Activities] AS [Extent1]
     //LEFT OUTER JOIN [dbo].[ActivitySignins] AS [Extent2] ON
     //        ([Extent1].[ID] = [Extent2].[activityID]) AND
     //        ([Extent2].[WorkerID] = <personID> )
     //WHERE [Extent2].[activityID] IS NULL
     q = from b in arepo.GetAllQ()
         join aa in
         // joins activities (a) to activity signins (az)
         // where az.personID
         (from a in q
          join az in asRepo.GetAllQ() on a.ID equals az.activityID into grouped
          from az2 in grouped.DefaultIfEmpty()
          where az2.personID == personID
          select a)
         on b.ID equals aa.ID into h
         from i in h.DefaultIfEmpty()
         where i == null
         select b;
 }