Exemple #1
0
        public static bool IsAdmin(this IStaffeUser stafferRequest)
        {
            if (stafferRequest == null)
            {
                throw new LogicException("未登錄");
            }

            return(string.Equals(stafferRequest.Role, "Admin", System.StringComparison.CurrentCultureIgnoreCase));
        }
Exemple #2
0
 public CalculationService(ProjectRepository repository, IBoundedContext bounded, IStaffeUser user) : base(bounded, user)
 {
     this.repository = repository;
 }
Exemple #3
0
 public BasicDataService(IRepository <BasicData> repository, ResourceService resourceService, IBoundedContext bounded, IStaffeUser user) : base(bounded, user)
 {
     this.repository      = repository;
     this.resourceService = resourceService;
 }
 public StandingbookService(ProjectRepository repository, IBoundedContext bounded, IStaffeUser user) : base(bounded, user)
 {
     this.repository = repository;
 }
Exemple #5
0
 public ProjectProcurementService(ProjectRepository repository, FileStorageServie fileStorageServie, IBoundedContext bounded, IStaffeUser user) : base(bounded, user)
 {
     this.repository        = repository;
     this.fileStorageServie = fileStorageServie;
 }
 public SupplierService(IRepository <Supplier> repository, ResourceService resourceService, IBoundedContext bounded, IStaffeUser user) : base(bounded, user)
 {
     this.repository      = repository;
     this.resourceService = resourceService;
 }
 public BaseService(IBoundedContext bounded, IStaffeUser user)
 {
     this.Bounded = bounded;
     this.User    = user;
 }
 public ProjectMasterService(ProjectRepository repository, ISerialNumberProvider serialNumberProvider, FileStorageServie fileStorageServie, IBoundedContext bounded, IStaffeUser user) : base(bounded, user)
 {
     this.repository           = repository;
     this.serialNumberProvider = serialNumberProvider;
     this.fileStorageServie    = fileStorageServie;
 }
Exemple #9
0
 public SettingService(SettingRepository repository, IBoundedContext bounded, IStaffeUser user) : base(bounded, user)
 {
     this.repository = repository;
 }
 public TargetCostService(TargetCostRepository repository, ISerialNumberProvider serialNumberProvider, IBoundedContext bounded, IStaffeUser user) : base(bounded, user)
 {
     this.repository           = repository;
     this.serialNumberProvider = serialNumberProvider;
 }