public void DeleteA(ILinkDemandAndProvider demandAndProviderLink)
 {
     if (demandAndProviderLink.GetType() == typeof(T_DemandToProvider))
     {
         DemandToProviderDelete((T_DemandToProvider)demandAndProviderLink);
     }
     else if (demandAndProviderLink.GetType() == typeof(T_ProviderToDemand))
     {
         ProviderToDemandDelete((T_ProviderToDemand)demandAndProviderLink);
     }
     else
     {
         throw new MrpRunException("This type is not expected.");
     }
 }
 public void AddAll(LinkDemandAndProviderTable linkDemandAndProviderTable)
 {
     if (linkDemandAndProviderTable.Any())
     {
         ILinkDemandAndProvider linkDemandAndProvider = linkDemandAndProviderTable.GetAny();
         if (linkDemandAndProvider.GetType() == typeof(T_DemandToProvider))
         {
             _demandToProviderTable.AddAll(linkDemandAndProviderTable);
         }
         else if (linkDemandAndProvider.GetType() == typeof(T_ProviderToDemand))
         {
             _providerToDemandTable.AddAll(linkDemandAndProviderTable);
         }
         else
         {
             throw new MrpRunException("Unexpected type.");
         }
     }
 }