Esempio n. 1
0
        public AbstractIndex AddJobIndex(JobIndexDTO jobIndexDto)
        {
            var jobIndex = jobIndexService.AddJobIndex(new AbstractJobIndexId(jobIndexDto.ParentId.Value),
                                                       jobIndexDto.Name, jobIndexDto.DictionaryName
                                                       , jobIndexDto.CustomFields.Select(c => new CustomFieldTypeId(c.Id)).ToList()
                                                       , jobIndexDto.TransferId);

            return(jobIndexMapper.MapToModel(jobIndex));
        }
Esempio n. 2
0
        public AbstractIndexInPeriodDTO AddJobIndex(JobIndexInPeriodDTO abstractIndex)
        {
            //var jobIndex = jobIndexService.AddJobIndex(new PeriodId(abstractIndex.PeriodId), new AbstractJobIndexId(abstractIndex.ParentId.Value),
            //                                    new SharedJobIndexId(abstractIndex.JobIndexId)
            //                                    , abstractIndex.CustomFields.ToDictionary(itm => new SharedJobIndexCustomFieldId(itm.Key.Id), itm => itm.Value)
            //                                    , abstractIndex.IsInquireable);

            var jobIndex = jobIndexService.AddJobIndex(new PeriodId(abstractIndex.PeriodId), new AbstractJobIndexId(abstractIndex.ParentId.Value),
                                                       new SharedJobIndexId(abstractIndex.JobIndexId)
                                                       , abstractIndex.CustomFields.ToDictionary(itm => new SharedJobIndexCustomFieldId(itm.Id), itm => itm.Value)
                                                       , abstractIndex.IsInquireable, abstractIndex.CalculationOrder, abstractIndex.CalculationLevel);

            return(jobIndexMapper.MapToModel(jobIndex));
        }