/// <summary>
 /// Возвращает значение, показывающее были ли изменения в данном элементе управления
 /// </summary>
 public bool GetChangeStatus(Component component)
 {
     try
     {
         if (!GlobalObjects.CasEnvironment.Calculator.IsEqual(Cost, component.Cost) ||
             !GlobalObjects.CasEnvironment.Calculator.IsEqual(CostOverhaul, component.CostOverhaul) ||
             !GlobalObjects.CasEnvironment.Calculator.IsEqual(CostServiceable, component.CostServiceable) ||
             !GlobalObjects.CasEnvironment.Calculator.IsEqual(ManHours, component.ManHours) ||
             KitRequered != component.KitRequired ||
             Remarks != component.Remarks ||
             HiddenRemarks != component.HiddenRemarks ||
             !LifeLimit.IsEqual(component.LifeLimit) ||
             !LifeLimitNotify.IsEqual(component.LifeLimitNotify) ||
             !lifelengthViewerWarranty.Lifelength.IsEqual(component.Warranty) ||
             !lifelengthViewerWarrantyNotify.Lifelength.IsEqual(component.WarrantyNotify) ||
             (component is BaseComponent
                 ? component.LLPMark && ((BaseComponent)component).LLPCategories && CurrentLLPLifeLimit.ToString() != component.LLPData.ToString()
                 : component.LLPMark && component.LLPCategories && CurrentLLPLifeLimit.ToString() != component.LLPData.ToString()) ||
             fileControl.GetChangeStatus())
         {
             return(true);
         }
     }
     catch (Exception ex)
     {
         Program.Provider.Logger.Log("Error while saving data", ex);
         return(true);
     }
     return(false);
 }
Example #2
0
 public bool Equals(BaseComponent y)
 {
     if (y == null ||
         ItemId != y.ItemId ||
         ATAChapter != y.ATAChapter ||
         PartNumber != y.PartNumber ||
         Description != y.Description ||
         SerialNumber != y.SerialNumber ||
         MaintenanceControlProcess != y.MaintenanceControlProcess ||
         Remarks != y.Remarks ||
         Model != y.Model ||
         Manufacturer != y.Manufacturer ||
         LLPMark != y.LLPMark ||
         LLPCategories != y.LLPCategories ||
         LandingGear != y.LandingGear ||
         AvionicsInventory != y.AvionicsInventory ||
         ALTPartNumber != y.ALTPartNumber ||
         MTOGW != y.MTOGW ||
         HushKit != y.HushKit ||
         Cost != y.Cost ||
         CostOverhaul != y.CostOverhaul ||
         CostServiceable != y.CostServiceable ||
         Quantity != y.Quantity ||
         ManHours != y.ManHours ||
         !Warranty.IsEqual(y.Warranty) ||
         !WarrantyNotify.IsEqual(y.WarrantyNotify) ||
         Serviceable != y.Serviceable ||
         GoodsClass != y.GoodsClass ||
         ShelfLife != y.ShelfLife ||
         MPDItem != y.MPDItem ||
         //Suppliers != y.Suppliers ||
         !LifeLimit.IsEqual(y.LifeLimit) ||
         !LifeLimitNotify.IsEqual(y.LifeLimitNotify) ||
         BaseComponentType != y.BaseComponentType)
     {
         return(false);
     }
     return(true);
 }