private void AddEmptyLine(List <Structures.ApprovalRuleCardReport.ConditionTableLine> linedRoute, int level)
        {
            var line = new Structures.ApprovalRuleCardReport.ConditionTableLine();

            line.Header = Reports.Resources.ApprovalRuleCardReport.EmptyString;
            var paddingLength = level * Constants.ApprovalRuleCardReport.LevelMultiplier;
            var padding       = new string('\u2003', paddingLength);

            line.Header = string.Format("{0}{1}", padding, line.Header);
            linedRoute.Add(line);
        }
        private void AddConditionToRoute(IApprovalRuleBase rule,
                                         List <Structures.ApprovalRuleCardReport.ConditionTableLine> linedRoute,
                                         IConditionBase condition,
                                         bool direction,
                                         string prefix,
                                         int level)
        {
            var conditionInfo  = new Structures.ApprovalRuleCardReport.ConditionTableLine();
            var conditionValue = direction ? Sungero.Docflow.Reports.Resources.ApprovalRuleCardReport.True : Sungero.Docflow.Reports.Resources.ApprovalRuleCardReport.False;
            var conditionName  = string.Format("{0}{1}", Functions.ConditionBase.GetConditionName(condition), conditionValue);

            var header = string.Format("{0} {1}", prefix, conditionName);

            conditionInfo.Header      = BreakLineAndAddPadding(header, Constants.ApprovalRuleCardReport.ConditionCellWidth, level);
            conditionInfo.Level       = level;
            conditionInfo.IsCondition = true;

            linedRoute.Add(conditionInfo);
        }
        private void AddConditionsToRoute(IApprovalRuleBase rule,
                                          List <Structures.ApprovalRuleCardReport.ConditionTableLine> linedRoute,
                                          List <Structures.ApprovalRuleCardReport.Transition> conditions,
                                          string prefix,
                                          int level)
        {
            var conditionInfo   = new Structures.ApprovalRuleCardReport.ConditionTableLine();
            var resources       = Sungero.Docflow.Reports.Resources.ApprovalRuleCardReport;
            var conditionsNames = conditions.Select(b => string.Format("{0}{1}",
                                                                       Functions.ConditionBase.GetConditionName(rule.Conditions.First(s => s.Number == b.SourceStage).Condition),
                                                                       b.ConditionValue == true ? resources.True : resources.False));
            var conditionsNamesLabel = string.Join(string.Format("{0}{1}", System.Environment.NewLine, Reports.Resources.ApprovalRuleCardReport.And), conditionsNames);
            var header = string.Format("{0} {1}", prefix, conditionsNamesLabel);

            conditionInfo.Header      = BreakLineAndAddPadding(header, Constants.ApprovalRuleCardReport.ConditionCellWidth, level);
            conditionInfo.Level       = level;
            conditionInfo.IsCondition = true;

            linedRoute.Add(conditionInfo);
        }