示例#1
0
        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()));
        }
示例#2
0
        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 ---");
            }
        }
示例#3
0
        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()));
        }
示例#4
0
        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()));
        }
示例#5
0
        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()));
        }
示例#6
0
        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()));
        }
示例#7
0
        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()));
        }
示例#8
0
            public static string LogSpecValuesInfo(IPayrollConcept concept)
            {
                string lineDefinition = string.Join(", ", concept.TargetValues());

                return(lineDefinition);
            }