/// <summary> /// Возвращает условие первого выполнения директивы в виде строки (Каждый параметр выводится в новой строке) /// </summary> /// <returns></returns> public string FirstPerformanceToStrings() { StringBuilder stringBuilder = new StringBuilder(); if (!FirstPerformanceSinceNew.IsNullOrZero() && !FirstPerformanceSinceEffectiveDate.IsNullOrZero()) { stringBuilder.Append(FirstPerformanceSinceNew.ToStrings()); stringBuilder.AppendLine("s./n."); stringBuilder.AppendLine("or"); stringBuilder.Append(FirstPerformanceSinceEffectiveDate.ToStrings()); stringBuilder.AppendLine("s/e.d."); stringBuilder.AppendLine(FirstPerformanceConditionType == ThresholdConditionType.WhicheverFirst ? "W.O.F" : "W.O.L"); } else if (!FirstPerformanceSinceNew.IsNullOrZero()) { stringBuilder.Append(FirstPerformanceSinceNew.ToStrings()); if (FirstPerformanceSinceNew.NotNullParamsCount() > 1) { stringBuilder.AppendLine(FirstPerformanceConditionType == ThresholdConditionType.WhicheverFirst ? "W.O.F" : "W.O.L"); } } else if (!FirstPerformanceSinceEffectiveDate.IsNullOrZero()) { stringBuilder.Append(FirstPerformanceSinceEffectiveDate.ToStrings()); stringBuilder.AppendLine("s/e.d."); if (FirstPerformanceSinceEffectiveDate.NotNullParamsCount() > 1) { stringBuilder.AppendLine(FirstPerformanceConditionType == ThresholdConditionType.WhicheverFirst ? "W.O.F" : "W.O.L"); } } return(stringBuilder.ToString()); }
/// <summary> /// Возвращает условие первого выполнения директиыв /// </summary> /// <returns></returns> private string FirstPerformanceToString() { string res = ""; // ресурсы заполнены // выводим результат if (!FirstPerformanceSinceNew.IsNullOrZero()) { res = LifelengthToString(FirstPerformanceSinceNew, "f.p"); } if (!FirstPerformanceSinceEffectiveDate.IsNullOrZero()) { res = LifelengthToString(FirstPerformanceSinceEffectiveDate, "f.p.s.e.d"); } if (!FirstNotification.IsNullOrZero()) { res += LifelengthToString(FirstNotification, "f.p.n"); } return("Perform at " + res.Trim()); }