Пример #1
0
        private static string getComponentDirectiveGroupString(ComponentDirective componentDirective)
        {
            string res;

            if (componentDirective.ParentComponent != null)
            {
                var title =
                    $"P/N:{componentDirective.ParentComponent.PartNumber} {componentDirective.ParentComponent.Description} Pos:{componentDirective.ParentComponent.Position} S/N:{componentDirective.ParentComponent.SerialNumber} {componentDirective.ParentComponent.MaintenanceControlProcess.ShortName}";

                var parentStore = GlobalObjects.StoreCore.GetStoreById(componentDirective.ParentComponent.ParentStoreId);

                if (componentDirective.ParentComponent.ParentAircraftId > 0)
                {
                    var currentDestination = DestinationHelper.GetDestinationStringFromAircraft(componentDirective.ParentComponent.ParentAircraftId, false,
                                                                                                null);
                    res = $"{currentDestination} | {title} | Component directives";
                }
                else if (parentStore != null)
                {
                    res = $"{parentStore} | {title} | Component directives";
                }
                else
                {
                    res = title + " | Component directives";
                }
            }
            else
            {
                res = "Component Directives";
            }

            return(res);
        }
Пример #2
0
 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
 }
Пример #3
0
        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);
        }
Пример #4
0
        private static string getMaintenanceCheckGroupString(MaintenanceCheck maintenanceCheck)
        {
            var currentDestination = DestinationHelper.GetDestinationStringFromAircraft(maintenanceCheck.ParentAircraftId, false, null);

            return($"{currentDestination} | Maintenance checks {(maintenanceCheck.Schedule ? "Schedule" : "Store")}");
        }
Пример #5
0
        public static string GetMaintenanceCheckGroupString(MaintenanceCheck maintenanceCheck, Lifelength current, Lifelength forecast)
        {
            var currentDestination = DestinationHelper.GetDestinationStringFromAircraft(maintenanceCheck.ParentAircraftId, false, null);

            return($"{currentDestination} | Maintenance checks  C:{current} F:{forecast}");
        }
Пример #6
0
        private static string getComponentGroupString(Component component)
        {
            var currentDestination = DestinationHelper.GetDestinationStringFromAircraft(component.ParentAircraftId, false, null);

            return(component.ParentBaseComponent != null ? $"{currentDestination} | {component.ParentBaseComponent} | Components" : "Components");
        }
Пример #7
0
        public static string GetComponentGroupString(Component component, Lifelength current, Lifelength forecast)
        {
            var currentDestination = DestinationHelper.GetDestinationStringFromAircraft(component.ParentAircraftId, false, null);

            return($"{currentDestination} | {component.ParentBaseComponent} | Components C:{current} F:{forecast}");
        }
Пример #8
0
        private static string getBaseComponentGroup(BaseComponent baseComponent)
        {
            var currentDestination = DestinationHelper.GetDestinationStringFromAircraft(baseComponent.ParentAircraftId, false, null);

            return($"{currentDestination} {baseComponent.BaseComponentType} . Component PN {baseComponent.PartNumber}");
        }