public static IEnumerable <ResultPack> EvaluateConcept(ConfigBase evalConfig, Period evalPeriod, IPeriodProfile evalProfile, Result <MasterItem.EvaluateSource, string> prepValues) { IEmployProfile conceptProfile = evalProfile.Employ(); if (conceptProfile == null) { return(EvaluateUtils.DecoratedError(CONCEPT_DESCRIPTION_ERROR_FORMAT, CONCEPT_PROFILE_NULL_TEXT)); } MasterItem.EvaluateSource conceptValues = prepValues.Value; // EVALUATION TSeconds[] scheduleRealMonth = conceptValues.RealMonthHours.ToArray(); TSeconds[] scheduleTermMonth = conceptProfile.TimesheetWorkSchedule(evalPeriod, scheduleRealMonth, conceptValues.DayTermFrom, conceptValues.DayTermStop); // EVALUATION IArticleResult conceptResult = new ArticleGeneralResult(evalConfig); // SET RESULT VALUES conceptResult.AddWorkMonthRealScheduleValue(scheduleRealMonth); conceptResult.AddWorkMonthTermScheduleValue(scheduleTermMonth); // SET RESULT VALUES return(EvaluateUtils.Results(conceptResult)); }
public static IEnumerable <ResultPack> EvaluateConcept(ConfigBase evalConfig, Period evalPeriod, IPeriodProfile evalProfile, Result <MasterItem.EvaluateSource, string> prepValues) { IEmployProfile conceptProfile = evalProfile.Employ(); if (conceptProfile == null) { return(EvaluateUtils.DecoratedError(CONCEPT_DESCRIPTION_ERROR_FORMAT, CONCEPT_PROFILE_NULL_TEXT)); } MasterItem.EvaluateSource conceptValues = prepValues.Value; // EVALUATION TSeconds[] positionMonth = PeriodUtils.EmptyMonthSchedule(); foreach (var absence in conceptValues.AbsenceList) { positionMonth = PeriodUtils.ScheduleFromTemplateStopInc(positionMonth, absence.ScheduleMonth, conceptValues.DayPositionFrom, conceptValues.DayPositionStop); } // EVALUATION IArticleResult conceptResult = new ArticleGeneralResult(evalConfig); // SET RESULT VALUES conceptResult.AddWorkMonthTermScheduleValue(positionMonth); // SET RESULT VALUES return(EvaluateUtils.Results(conceptResult)); }
public static IEnumerable <ResultPack> EvaluateConcept(ConfigBase evalConfig, Period evalPeriod, IPeriodProfile evalProfile, Result <MasterItem.EvaluateSource, string> prepValues) { IEmployProfile conceptProfile = evalProfile.Employ(); if (conceptProfile == null) { return(EvaluateUtils.DecoratedError(CONCEPT_DESCRIPTION_ERROR_FORMAT, CONCEPT_PROFILE_NULL_TEXT)); } MasterItem.EvaluateSource conceptValues = prepValues.Value; // EVALUATION TSeconds[] scheduleWorked = PeriodUtils.ScheduleBaseSubtract( conceptValues.ScheduleMonth, conceptValues.AbsencesMonth, 1, 31); // EVALUATION IArticleResult conceptResult = new ArticleGeneralResult(evalConfig); // SET RESULT VALUES conceptResult.AddWorkMonthTermScheduleValue(scheduleWorked); // SET RESULT VALUES return(EvaluateUtils.Results(conceptResult)); }