public static IBookResult CreateMonthlyAmountPaymentsResult(IPayrollConcept concept, IBookIndex element, IPayrollArticle article, ITargetValues targets, decimal factorValue, decimal amountValue, Int32 recordHours) { IResultValues results = ResultValueBuilder.BuildMonthlyAmountPaymentsResult(targets, factorValue, amountValue, recordHours); return(new BookResult(element, article, results, concept.TargetValues(), concept.ResultValues())); }
public static IBookResult[] BuildListWithCloneResult(IPayrollConcept concept, IBookIndex element, IPayrollArticle article, ITargetValues targets) { IBookResult result = BookResultBuilder.CreateCloneResult(concept, element, article, targets); IBookResult[] resultList = BuildListWithResult(result); return(resultList); }
public static IBookResult[] BuildPositionEmplTermResults(IPayrollConcept concept, IBookIndex element, IPayrollArticle article, ITargetValues targets, uint dayFromOrdinal, uint dayEndsOrdinal) { IBookResult result = BookResultBuilder.CreatePositionEmplTermResult(concept, element, article, targets, dayFromOrdinal, dayEndsOrdinal); IBookResult[] resultList = BuildListWithResult(result); return(resultList); }
public static IBookResult[] BuildTimesheetWorkingResult(IPayrollConcept concept, IBookIndex element, IPayrollArticle article, ITargetValues targets, Int32[] timeTable) { IBookResult result = BookResultBuilder.CreateWorkTimetableResult(concept, element, article, targets, timeTable); IBookResult[] resultList = BuildListWithResult(result); return(resultList); }
public static IBookResult[] BuildTimehoursAbsenceResult(IPayrollConcept concept, IBookIndex element, IPayrollArticle article, ITargetValues targets, Int32 timeValue) { IBookResult result = BookResultBuilder.CreateAbsenceCountResult(concept, element, article, targets, timeValue); IBookResult[] resultList = BuildListWithResult(result); return(resultList); }
public static IPayrollConcept FindConceptForCode(IDictionary <uint, IPayrollConcept> models, uint conceptCode) { IPayrollConcept baseInstance = null; if (models.ContainsKey(conceptCode)) { baseInstance = models[conceptCode]; } return(baseInstance); }
public static IBookResult[] BuildSalaryBaseResult(IPayrollConcept concept, IBookIndex element, IPayrollArticle article, ITargetValues targets, decimal factorValue, decimal amountValue, Int32 recordWorking) { IBookResult result = BookResultBuilder.CreateMonthlyAmountPaymentsResult(concept, element, article, targets, factorValue, amountValue, recordWorking); IBookResult[] resultList = BuildListWithResult(result); return(resultList); }
public BookTarget(IBookIndex bookElement, IPayrollArticle bookArticle, IPayrollConcept bookConcept, ITargetValues bookValues) { __element = bookElement; __article = bookArticle; __concept = bookConcept; __values = bookValues; }
public static IBookResult[] BuildIncomeGrossResult(IPayrollConcept concept, IBookIndex element, IPayrollArticle article, ITargetValues targets, decimal incomeValue) { IBookResult result = BookResultBuilder.CreateRecordIncomeResult(concept, element, article, targets, incomeValue); IBookResult[] resultList = BuildListWithResult(result); return(resultList); }
public IPayrollConcept ConfigureConcept(SymbolName concept, bool nodeContract, bool nodePosition, bool qualContract, bool qualPosition, string targetValues, string resultValues, GeneralModule.EvaluateDelegate evaluate) { IPayrollConcept conceptInstance = GeneralPayrollConcept.CreateConcept( concept, nodeContract, nodePosition, qualContract, qualPosition, targetValues, resultValues, evaluate); return(ConfigureModel(conceptInstance, concept.Code)); }
public void Should_Return_UnknownConcept_As_TypeOf() { SymbolName testSpecName = ConceptSymbolName.REF_UNKNOWN; Assembly configAssembly = typeof(ProcessConfigSetCzModule).Assembly; IPayrollConcept testConcept = PayrollConceptFactory.ConceptFor(configAssembly, testSpecName.Name); Type testTypeOfConcept = testConcept.GetType(); Assert.AreSame(typeof(UnknownConcept), testTypeOfConcept); }
public void Should_Return_UnknownConcept_From_Models() { SymbolName testSpecName = ConceptSymbolName.REF_UNKNOWN; IPayrollConcept testConcept = testConfig.FindConcept(testSpecName.Code); Type testTypeOfConcept = testConcept.GetType(); Assert.AreSame(typeof(UnknownConcept), testTypeOfConcept); Assert.AreEqual(testConcept.ConceptCode(), testSpecName.Code); }
static public IBookTarget BuildTargetFromElement(IBookIndex element, ITargetValues values, IProcessConfig config) { uint articleCode = element.Code(); IPayrollArticle targetArticle = config.FindArticle(articleCode); IPayrollConcept targetConcept = config.FindConcept(targetArticle.ConceptCode()); IBookTarget target = TargetFactory.BuildTargetWithValues(element, targetArticle, targetConcept, values); return(target); }
public static IDictionary <IBookIndex, IBookTarget> BuildEvaluationStream(IDictionary <IBookIndex, IBookTarget> initialStream, IBookParty[] contracts, IBookParty[] positions, IPayrollArticle article, IProcessConfig configModule) { ITargetValues emptyValues = null; IPayrollConcept concept = configModule.FindConcept(article.ConceptCode()); IBookParty[] parties = concept.GetTargetParties(BookParty.GetEmpty(), contracts, positions); var targets = parties.Aggregate(initialStream, (agr, party) => BuildArticleTarget(initialStream, party, article, emptyValues, configModule)); return(targets); }
public static string LogConceptInfo(IPayrollConcept concept, IPayrollArticle article) { string calcDefinition = Enum.ToObject(typeof(ProcessCategory), article.Category()).ToString(); string lineDefinition = string.Format("{0}\t{1}\t{2}\t", article.ArticleName(), concept.ConceptName(), calcDefinition); lineDefinition += LogPendingArticlesInfo(article); lineDefinition += LogSummaryArticlesInfo(article); lineDefinition += LogSpecValuesInfo(concept); return(lineDefinition); }
public void LogArticlesNames(IPayrollArticle[] articles, IDictionary <uint, IPayrollConcept> concepts, string testName) { OpenLogStream(testName); using (StreamWriter logWriter = new StreamWriter(LogFileStream)) { string lineDefinition = "\n--- begin ---"; foreach (var article in articles) { lineDefinition += ModelConceptsLogger.LogArticleInfo(article); IPayrollConcept concept = ModelConceptsLogger.FindConceptForCode(concepts, article.ConceptCode()); foreach (string target in concept.TargetValues()) { lineDefinition += string.Format("{0} - {1}\n", "TARGET", target); } foreach (string result in concept.ResultValues()) { lineDefinition += string.Format("{0} - {1}\n", "RESULT", result); } } foreach (var article in articles) { lineDefinition += ModelConceptsLogger.LogArticleEvalNames(article); } foreach (var article in articles) { IPayrollConcept concept = ModelConceptsLogger.FindConceptForCode(concepts, article.ConceptCode()); if (concept.TargetValues().Length > 0) { lineDefinition += ModelConceptsLogger.LogArticleValuesNames(article); } } if (lineDefinition.Length > 0) { logWriter.WriteLine(lineDefinition); } logWriter.WriteLine("--- end ---"); } }
public void LogConceptsInModels(IDictionary <uint, IPayrollArticle> articles, IDictionary <uint, IPayrollConcept> concepts, string testName) { Stream logStream = OpenCustomStream(testName); using (StreamWriter logWriter = new StreamWriter(logStream)) { logWriter.WriteLine("\n--- begin ---"); foreach (var articlePair in articles) { IPayrollArticle article = articlePair.Value; IPayrollConcept concept = ModelConceptsLogger.FindConceptForCode(concepts, article.ConceptCode()); string lineDefinition = ModelConceptsLogger.LogConceptNames(concept, article); logWriter.WriteLine(lineDefinition); } logWriter.WriteLine("--- end ---"); } }
public ITargetStream AddTargetIntoSubLevel(SymbolName article, ITargetValues values, IProcessConfig config) { uint articleCode = article.Code; IPayrollArticle targetArticle = config.FindArticle(articleCode); uint conceptCode = targetArticle.ConceptCode(); IPayrollConcept targetConcept = config.FindConcept(conceptCode); IBookParty addParty = targetConcept.GetTargetParty(LastParty()); var retTuple = TargetsTupleComposer.AddTargetBySymbol(Targets(), addParty, article, values, config); var nextFacts = retTuple.Item2; var nextIndex = retTuple.Item1; var nextParty = targetConcept.GetNextTargetParty(nextIndex); return(new TargetStream(nextFacts, nextParty, nextIndex)); }
public static IBookResult CreateTimesheetScheduleResult(IPayrollConcept concept, IBookIndex element, IPayrollArticle article, ITargetValues targets, Int32[] timeTable) { IResultValues results = ResultValueBuilder.BuildTimesheetScheduleResult(targets, timeTable); return(new BookResult(element, article, results, concept.TargetValues(), concept.ResultValues())); }
public static IBookResult CreatePositionEmplTermResult(IPayrollConcept concept, IBookIndex element, IPayrollArticle article, ITargetValues targets, uint dayFromOrdinal, uint dayEndsOrdinal) { IResultValues results = ResultValueBuilder.BuildPositionEmplTermResult(targets, dayFromOrdinal, dayEndsOrdinal); return(new BookResult(element, article, results, concept.TargetValues(), concept.ResultValues())); }
public static IBookResult CreateCloneResult(IPayrollConcept concept, IBookIndex element, IPayrollArticle article, ITargetValues targets) { IResultValues results = ResultValueBuilder.BuildTargetResult(targets); return(new BookResult(element, article, results, concept.TargetValues(), concept.ResultValues())); }
public static IBookResult CreateAmountDeductedResult(IPayrollConcept concept, IBookIndex element, IPayrollArticle article, ITargetValues targets, decimal amountValue) { IResultValues results = ResultValueBuilder.BuildAmountDeductedResult(targets, amountValue); return(new BookResult(element, article, results, concept.TargetValues(), concept.ResultValues())); }
public static IBookTarget BuildTargetWithValues(IBookIndex element, IPayrollArticle article, IPayrollConcept concept, ITargetValues values) { return(new BookTarget(element, article, concept, values)); }
public IPayrollConcept ArticleConceptFromModels(Assembly configAssembly, IPayrollArticle article) { IPayrollConcept baseConcept = ConceptFromModels(configAssembly, article.ConceptCode()); return(baseConcept); }
public static string LogConceptNames(IPayrollConcept concept, IPayrollArticle article) { string lineDefinition = string.Format("\n{0}", PayrollArticleFactory.ClassNameFor(article.ArticleName())); return(lineDefinition); }
public static IBookResult CreateRecordTimeResult(IPayrollConcept concept, IBookIndex element, IPayrollArticle article, ITargetValues targets, Int32 timeValue) { IResultValues results = ResultValueBuilder.BuildRecordTimeResult(targets, timeValue); return(new BookResult(element, article, results, concept.TargetValues(), concept.ResultValues())); }
public IPayrollConcept FindConcept(uint conceptCode) { IPayrollConcept baseConcept = FindInstanceForCode(conceptCode); return(baseConcept); }
public IPayrollConcept ConceptFromModels(Assembly configAssembly, uint conceptCode) { IPayrollConcept baseConcept = InstanceFromModels(configAssembly, conceptCode); return(baseConcept); }
protected override IPayrollConcept InstanceFor(Assembly configAssembly, SymbolName configSymbol) { IPayrollConcept emptyConcept = PayrollConceptFactory.ConceptFor(configAssembly, configSymbol.Name); return(emptyConcept); }
public static string LogSpecValuesInfo(IPayrollConcept concept) { string lineDefinition = string.Join(", ", concept.TargetValues()); return(lineDefinition); }