Example #1
0
        public override bool Execute(ICustomInterpreted element)
        {
            bool result = false;

            var dayRule = GetDayRule(element);

            if (dayRule != null)
            {
                //приоритет
                int?priority = (element as ModifyDay).Priority;

                if (priority == null)
                {
                    priority = dayRule.Template.Priority;
                }

                PrintDayTemplate printTemplate = null;

                //ссылка на печатный шаблон
                if ((element as ModifyDay).SignNumber != null)
                {
                    printTemplate = _dbContext.GetPrintDayTemplate(_typiconVersionId, (int)(element as ModifyDay).SignNumber);
                }

                var request = CreateRequest(dayRule, element as ModifyDay, (int)priority, printTemplate);

                _modifiedYear.AddModifiedRule(request);

                result = true;
            }

            return(result);
        }