public static string GetComponentDirectiveGroupString(ComponentDirective componentDirective, Lifelength current, Lifelength forecast) { if (componentDirective.ParentComponent.ParentAircraftId > 0) { var currentDestination = DestinationHelper.GetDestinationStringFromAircraft(componentDirective.ParentComponent.ParentAircraftId, false, null); //TODO:(Evgenii Babak) Переименовать Detail в Component return($"{currentDestination} | {componentDirective.ParentComponent} | Detail directives C:{current} F:{forecast}"); } if (componentDirective.ParentComponent.ParentStoreId > 0) { var currentDestination = DestinationHelper.GetDestinationStringFromStore(componentDirective.ParentComponent.ParentStoreId, componentDirective.ParentComponent.ItemId, false); //TODO:(Evgenii Babak) Переименовать Detail в Component return($"{currentDestination} | Detail directives C:{current} F:{forecast}"); } return(componentDirective.ParentComponent + " | Detail directives"); //TODO:(Evgenii Babak) Переименовать Detail в Component }
private static string getDirectiveGroupString(Directive directive) { var res = ""; var currentDestination = directive.ParentBaseComponent.ParentAircraftId > 0 ? DestinationHelper.GetDestinationStringFromAircraft(directive.ParentBaseComponent.ParentAircraftId, false, directive.ParentBaseComponent.ItemId) : DestinationHelper.GetDestinationStringFromStore(directive.ParentBaseComponent.ParentStoreId, directive.ParentBaseComponent.ItemId, false); if (directive is DeferredItem) { res = $"{currentDestination} | Deffred"; } else if (directive is DamageItem) { res = $"{currentDestination} | Damage"; } else if (directive.DirectiveType == DirectiveType.OutOfPhase) { res = $"{currentDestination} | Out of phase"; } else { if (directive.DirectiveType.ItemId == DirectiveType.AirworthenessDirectives.ItemId) { res = $"{currentDestination} | AD"; } else if (directive.DirectiveType.ItemId == DirectiveType.EngineeringOrders.ItemId) { res = $"{currentDestination} | Engineering orders"; } else if (directive.DirectiveType.ItemId == DirectiveType.SB.ItemId) { res = $"{currentDestination} | Service bulletins"; } } return(res); }