Пример #1
0
 public static bool IsAnnuity(XElement currentElement)
 {
     bool bIsAnnuity = false;
     ANNUITY_TYPES eAnnuityType = GetAnnuityType(currentElement);
     string sAnnuityLabel = CalculatorHelpers.GetAttribute(currentElement, 
         Calculator1.cLabel);
     if (eAnnuityType != ANNUITY_TYPES.none
         || sAnnuityLabel == DataAppHelpers.Economics1.ANNUITY)
     {
         bIsAnnuity = true;
     }
     return bIsAnnuity;
 }
Пример #2
0
 public static ANNUITY_TYPES GetAnnuityType(XElement el)
 {
     ANNUITY_TYPES eAnnuityType = ANNUITY_TYPES.none;
     string sAnnuityType = CalculatorHelpers.GetAttribute(el,
         DataAppHelpers.Economics1.ANNUITY_TYPE);
     if (!string.IsNullOrEmpty(sAnnuityType))
     {
         if (sAnnuityType == ANNUITY_TYPES.preproduction.ToString())
         {
             eAnnuityType = ANNUITY_TYPES.preproduction;
         }
         else if (sAnnuityType == ANNUITY_TYPES.regular.ToString())
         {
             eAnnuityType = ANNUITY_TYPES.regular;
         }
     }
     return eAnnuityType;
 }