public static string GetValue(this AccountCurrency accountCurrency, AccountStatusItemType type)
 {
     switch (type)
     {
         case AccountStatusItemType.Necessary:
             return CommonHelper.Format(accountCurrency.CurrencyTradingSummary.Necessary, 2);
         case AccountStatusItemType.ONNecessary:
             return CommonHelper.Format(accountCurrency.CurrencyTradingSummary.OverNightNecessary, 2);
         case AccountStatusItemType.NotValue:
             return CommonHelper.Format(accountCurrency.CurrencyTradingSummary.NotValue, 2);
         case AccountStatusItemType.Usable:
             return CommonHelper.Format(accountCurrency.CurrencyTradingSummary.Usable, 2);
         case AccountStatusItemType.ONUsable:
             return CommonHelper.Format(accountCurrency.CurrencyTradingSummary.OverNightUsable, 2);
         case AccountStatusItemType.Balance:
             return CommonHelper.Format(accountCurrency.CurrencyTradingSummary.Balance, 2);
         case AccountStatusItemType.Floating:
             return CommonHelper.Format(accountCurrency.CurrencyTradingSummary.Floating, 2);
         case AccountStatusItemType.Deposit:
             return CommonHelper.Format(accountCurrency.CurrencyTradingSummary.Deposit, 2);
         case AccountStatusItemType.Equity:
             return CommonHelper.Format(accountCurrency.CurrencyTradingSummary.Equity, 2);
         case AccountStatusItemType.Ratio:
             return CommonHelper.Format(accountCurrency.CurrencyTradingSummary.Ratio, 2);
         case AccountStatusItemType.Adjustment:
             return CommonHelper.Format(accountCurrency.CurrencyTradingSummary.Adjustment, 2);
         default:
             throw new NotSupportedException(string.Format("{0}", type));
     }
 }
 public AccountStatusItem(AccountStatusItemType type, string value)
 {
     this._Value = value;
     this.Type = type;
     this.SubItems = new List<SubCurrencyItem>();
 }
 public SubCurrencyItem(Currency currency, AccountStatusItemType type)
 {
     this.Currency = currency;
     this.Type = type;
 }