示例#1
0
 public UnitInquiryServiceFacade(IUnitInquiryService inquiryService,
                                 IMapper <InquirySubjectWithUnit, InquiryUnitDTO> inquiySubjectMapper,
                                 IUnitIndexRepository unitIndexRep)
 {
     this.inquiryService      = inquiryService;
     this.inquiySubjectMapper = inquiySubjectMapper;
     this.unitIndexRep        = unitIndexRep;
 }
示例#2
0
 public static void CreateUnitIndexCategory(IUnitIndexRepository unitIndexRepository)
 {
     if (unitIndexCategory == null)
     {
         unitIndexCategory = new UnitIndexCategory(unitIndexRepository.GetNextId(), null, "شاخص های سازمانی",
                                                   "UnitIndexCategory");
         unitIndexRepository.Add(unitIndexCategory);
     }
 }
示例#3
0
        public UnitIndexService(

            IUnitIndexRepository unitIndexRep,
            IPeriodRepository periodRep,
            IPMSAdminService ipmsAdminService,
            IPeriodManagerService periodChecker
            )
        {
            this.periodRep       = periodRep;
            this.pmsAdminService = ipmsAdminService;
            this.periodChecker   = periodChecker;
            this.unitIndexRep    = unitIndexRep;
        }
 public PeriodUnitIndexFacadeService(
     IUnitIndexService UnitIndexService,
     IMapper <AbstractUnitIndex, AbstractUnitIndexInPeriodDTO> UnitIndexMapper,
     IMapper <AbstractUnitIndex, AbstractUnitIndexInPeriodDTOWithActions> UnitIndexWithActionsMapper,
     IMapper <SharedUnitIndexCustomField, AbstractCustomFieldDescriptionDTO> abstractCustomFieldDtoMapper,
     IUnitIndexRepository UnitIndexRep
     )
 {
     this.UnitIndexService             = UnitIndexService;
     this.UnitIndexMapper              = UnitIndexMapper;
     this.UnitIndexWithActionsMapper   = UnitIndexWithActionsMapper;
     this.abstractCustomFieldDtoMapper = abstractCustomFieldDtoMapper;
     this.UnitIndexRep = UnitIndexRep;
 }
示例#5
0
 public UnitIndexFacadeService(
     IUnitIndexService unitIndexService,
     ICustomFieldRepository customFieldRep,
     IMapper <AbstractUnitIndex, AbstractIndex> unitIndexMapper,
     IMapper <AbstractUnitIndex, AbstractUnitIndexDTOWithActions> unitIndexWithActionsMapper,
     IMapper <CustomFieldType, CustomFieldDTO> customFieldDtoMapper,
     IUnitIndexRepository unitIndexRep
     )
 {
     this.unitIndexService           = unitIndexService;
     this.customFieldRep             = customFieldRep;
     this.unitIndexMapper            = unitIndexMapper;
     this.unitIndexWithActionsMapper = unitIndexWithActionsMapper;
     this.customFieldDtoMapper       = customFieldDtoMapper;
     this.unitIndexRep = unitIndexRep;
 }
示例#6
0
 public PeriodService(
     IPeriodRepository periodRep,
     IUnitIndexRepository unitIndexRepository,
     IJobIndexRepository jobIndexRepository,
     IPeriodManagerService periodManagerService,
     IJobIndexServiceFactory jobIndexServiceFactory,
     IUnitIndexServiceFactory unitIndexServiceFactory
     )
 {
     this.periodRep               = periodRep;
     this.periodManagerService    = periodManagerService;
     this.jobIndexServiceFactory  = jobIndexServiceFactory;
     this.unitIndexServiceFactory = unitIndexServiceFactory;
     this.unitIndexRepository     = unitIndexRepository;
     this.jobIndexRepository      = jobIndexRepository;
 }
示例#7
0
        public static void CreateUnitIndex(IUnitIndexRepository unitIndexRepository, string name, string dictionaryName)
        {
            if (unitIndexCategory == null)
            {
                unitIndexCategory = new UnitIndexCategory(unitIndexRepository.GetNextId(), null, "شاخص های سازمانی",
                                                          "UnitIndices");
                unitIndexRepository.Add(unitIndexCategory);
            }

            var unitIndex = new UnitIndex(unitIndexRepository.GetNextId(), unitIndexCategory,
                                          name, dictionaryName);

            unitIndex.AssignCustomFields(DefinedCustomFields.Where(dc => dc.EntityId == EntityTypeEnum.UnitIndex).ToList());
            unitIndexRepository.Add(unitIndex);
            UnitIndices.Add(unitIndex);
        }
示例#8
0
 public UnitService(
     IUnitRepository unitRep,
     IPeriodRepository periodRep,
     IUnitIndexRepository unitIndexRep
     , IPMSAdminService ipmsAdminService,
     IPeriodManagerService periodChecker,
     IUnitInquiryConfiguratorService configuratorService,
     IEmployeeRepository employeeRepository)
 {
     this.periodRep        = periodRep;
     this.ipmsAdminService = ipmsAdminService;
     this.unitRep          = unitRep;
     this.unitIndexRep     = unitIndexRep;
     this.periodChecker    = periodChecker;
     _configuratorService  = configuratorService;
     _employeeRepository   = employeeRepository;
 }
示例#9
0
        public static void CreateUnitIndex(IUnitIndexRepository unitIndexRepository, PMSAdmin.Domain.Model.UnitIndices.UnitIndex adminUnitIndex,
                                           UnitIndexGroup unitIndexGroup, bool isInquireable, Dictionary <PMSAdmin.Domain.Model.CustomFieldTypes.CustomFieldType, string> customFieldsDictionary)
        {
            var sharedUnitIndex = new SharedUnitIndex(new SharedUnitIndexId(adminUnitIndex.Id.Id), adminUnitIndex.Name,
                                                      adminUnitIndex.DictionaryName);
            var unitIndex = new UnitIndex(unitIndexRepository.GetNextId(), Period, sharedUnitIndex, unitIndexGroup,
                                          isInquireable);
            var sharedCustomFieldsDic =
                customFieldsDictionary.ToDictionary(
                    c =>
                    new SharedUnitIndexCustomField(new SharedUnitIndexCustomFieldId(c.Key.Id.Id), c.Key.Name,
                                                   c.Key.DictionaryName, c.Key.MinValue, c.Key.MaxValue),
                    c => c.Value);

            unitIndex.UpdateCustomFields(sharedCustomFieldsDic);
            unitIndexRepository.Add(unitIndex);
            unitIndices.Add(unitIndex);
        }
示例#10
0
 public UnitInquiryService(
     IUnitInquiryConfiguratorService configurator,
     IEmployeeRepository employeeRep,
     IInquiryUnitIndexPointRepository inquiryUnitIndexPointRep,
     IUnitRepository unitRep,
     IUnitIndexRepository unitIndexRep,
     IInquiryUnitIndexPointService inquiryUnitIndexPointService,
     IPeriodManagerService periodChecker
     )
 {
     this.configurator             = configurator;
     this.employeeRep              = employeeRep;
     this.inquiryUnitIndexPointRep = inquiryUnitIndexPointRep;
     this.unitRep      = unitRep;
     this.unitIndexRep = unitIndexRep;
     this.inquiryUnitIndexPointService = inquiryUnitIndexPointService;
     this.periodChecker = periodChecker;
 }
示例#11
0
 public PeriodUnitServiceFacade(IUnitService unitService,
                                IMapper <Unit, UnitInPeriodAssignmentDTO> unitAssignmentMapper,
                                IFilterMapper <Unit, UnitInPeriodDTOWithActions> unitInPeriodDTOWithActionsMapper,
                                IFilterMapper <Unit, UnitInPeriodDTO> unitInPeriodDTOMapper,
                                IMapper <UnitCustomField, CustomFieldDTO> unitCustomFieldMapper,
                                IUnitRepository unitRep,
                                IUnitIndexService unitIndexService,
                                IEmployeeRepository employeeRepository,
                                IUnitIndexRepository unitIndexRepository)
 {
     this.unitService                      = unitService;
     this.unitAssignmentMapper             = unitAssignmentMapper;
     this.unitInPeriodDTOWithActionsMapper = unitInPeriodDTOWithActionsMapper;
     this.unitInPeriodDTOMapper            = unitInPeriodDTOMapper;
     this.unitRep = unitRep;
     this.unitCustomFieldMapper = unitCustomFieldMapper;
     this.unitIndexService      = unitIndexService;
     _employeeRepository        = employeeRepository;
     _unitIndexRepository       = unitIndexRepository;
 }
示例#12
0
 public UnitIndexService(IUnitIndexRepository unitIndexRep
                         , ICustomFieldRepository customFieldRep)
 {
     this.unitIndexRep   = unitIndexRep;
     this.customFieldRep = customFieldRep;
 }