예제 #1
0
        public virtual void SetTotalME2IndicatorStocksProperties(XElement calculator)
        {
            //remember that the analyzer inheriting from this must .SetAnalyzerProps
            if (this.ME2IndicatorStocks == null)
            {
                this.ME2IndicatorStocks = new List <ME2IndicatorStock>();
            }
            //score, or index = 0, is just another stock that can be aggreg and compared to other scores
            int i = 0;
            //standard attname used throughout DevTreks
            string sAttNameExtension = string.Empty;
            //don't make unnecessary collection members
            string sHasAttribute = string.Empty;

            for (i = 0; i < this.MaximumNumberOfME2IndicatorStocks; i++)
            {
                sAttNameExtension = i.ToString();
                sHasAttribute     = CalculatorHelpers.GetAttribute(calculator,
                                                                   string.Concat(cTME2Name, sAttNameExtension));
                if (!string.IsNullOrEmpty(sHasAttribute))
                {
                    sHasAttribute = CalculatorHelpers.GetAttribute(calculator,
                                                                   string.Concat(cTME2Label, sAttNameExtension));
                    if (!string.IsNullOrEmpty(sHasAttribute))
                    {
                        ME2IndicatorStock ind1 = new ME2IndicatorStock(this.CalcParameters);
                        SetTotalME2IndicatorStockProperties(ind1, sAttNameExtension, calculator);
                        this.ME2IndicatorStocks.Add(ind1);
                    }
                }
                sHasAttribute = string.Empty;
            }
        }
예제 #2
0
        public virtual string GetTotalME2IndicatorStocksProperty(string attName, int colIndex)
        {
            string sPropertyValue = string.Empty;

            if (this.ME2IndicatorStocks.Count >= (colIndex + 1))
            {
                ME2IndicatorStock ind = this.ME2IndicatorStocks.ElementAt(colIndex);
                if (ind != null)
                {
                    sPropertyValue = GetTotalME2IndicatorStockProperty(ind, attName);
                }
            }
            return(sPropertyValue);
        }
예제 #3
0
 public virtual void CopyTotalME2IndicatorStocksProperties(
     ME2IndicatorStock calculator)
 {
     if (calculator.ME2IndicatorStocks != null)
     {
         if (this.ME2IndicatorStocks == null)
         {
             this.ME2IndicatorStocks = new List <ME2IndicatorStock>();
         }
         foreach (ME2IndicatorStock calculatorInd in calculator.ME2IndicatorStocks)
         {
             ME2IndicatorStock indstock = new ME2IndicatorStock(calculator.CalcParameters);
             CopyTotalME2IndicatorStockProperties(indstock, calculatorInd);
             this.ME2IndicatorStocks.Add(indstock);
         }
     }
 }
예제 #4
0
        public void CopyTotalME2IndicatorStockProperties(ME2IndicatorStock ind,
                                                         ME2IndicatorStock calculator)
        {
            ind.ErrorMessage    = calculator.ErrorMessage;
            ind.TME2Description = calculator.TME2Description;
            ind.TME2Name        = calculator.TME2Name;
            ind.TME2Label       = calculator.TME2Label;
            ind.TME2Type        = calculator.TME2Type;
            ind.TME2RelLabel    = calculator.TME2RelLabel;
            ind.TME2TAmount     = calculator.TME2TAmount;
            ind.TME2TUnit       = calculator.TME2TUnit;
            ind.TME2TD1Amount   = calculator.TME2TD1Amount;
            ind.TME2TD1Unit     = calculator.TME2TD1Unit;
            ind.TME2TD2Amount   = calculator.TME2TD2Amount;
            ind.TME2TD2Unit     = calculator.TME2TD2Unit;
            ind.TME2MathResult  = calculator.TME2MathResult;
            ind.TME2MathSubType = calculator.TME2MathSubType;

            ind.TME2TMAmount       = calculator.TME2TMAmount;
            ind.TME2TMUnit         = calculator.TME2TMUnit;
            ind.TME2TLAmount       = calculator.TME2TLAmount;
            ind.TME2TLUnit         = calculator.TME2TLUnit;
            ind.TME2TUAmount       = calculator.TME2TUAmount;
            ind.TME2TUUnit         = calculator.TME2TUUnit;
            ind.TME2MathOperator   = calculator.TME2MathOperator;
            ind.TME2MathExpression = calculator.TME2MathExpression;
            ind.TME2N        = calculator.TME2N;
            ind.TME2Date     = calculator.TME2Date;
            ind.TME2MathType = calculator.TME2MathType;
            ind.TME2BaseIO   = calculator.TME2BaseIO;
            ind.TME21Amount  = calculator.TME21Amount;
            ind.TME21Unit    = calculator.TME21Unit;
            ind.TME22Amount  = calculator.TME22Amount;
            ind.TME22Unit    = calculator.TME22Unit;
            ind.TME25Amount  = calculator.TME25Amount;
            ind.TME25Unit    = calculator.TME25Unit;
            ind.TME23Amount  = calculator.TME23Amount;
            ind.TME23Unit    = calculator.TME23Unit;
            ind.TME24Amount  = calculator.TME24Amount;
            ind.TME24Unit    = calculator.TME24Unit;

            //copy the calculator.ME2Indicators
            ind.CopyME2IndicatorsProperties(calculator);
        }
예제 #5
0
        public virtual void SetTotalME2IndicatorStocksProperty(string attName,
                                                               string attValue, int colIndex)
        {
            if (this.ME2IndicatorStocks == null)
            {
                this.ME2IndicatorStocks = new List <ME2IndicatorStock>();
            }
            if (this.ME2IndicatorStocks.Count < (colIndex + 1))
            {
                ME2IndicatorStock ind1 = new ME2IndicatorStock(this.CalcParameters);
                this.ME2IndicatorStocks.Insert(colIndex, ind1);
            }
            ME2IndicatorStock ind = this.ME2IndicatorStocks.ElementAt(colIndex);

            if (ind != null)
            {
                SetTotalME2IndicatorStockProperty(ind, attName, attValue);
            }
        }
예제 #6
0
 public void InitTotalME2IndicatorStockProperties(ME2IndicatorStock ind)
 {
     ind.ErrorMessage       = string.Empty;
     ind.TME2Description    = string.Empty;
     ind.TME2Name           = string.Empty;
     ind.TME2Label          = string.Empty;
     ind.TME2Type           = RUC_TYPES.none.ToString();
     ind.TME2RelLabel       = string.Empty;
     ind.TME2TAmount        = 0;
     ind.TME2TUnit          = string.Empty;
     ind.TME2TD1Amount      = 0;
     ind.TME2TD1Unit        = string.Empty;
     ind.TME2TD2Amount      = 0;
     ind.TME2TD2Unit        = string.Empty;
     ind.TME2MathResult     = string.Empty;
     ind.TME2MathSubType    = Constants.NONE;
     ind.TME2TMAmount       = 0;
     ind.TME2TMUnit         = string.Empty;
     ind.TME2TLAmount       = 0;
     ind.TME2TLUnit         = string.Empty;
     ind.TME2TUAmount       = 0;
     ind.TME2TUUnit         = string.Empty;
     ind.TME2MathOperator   = MATH_OPERATOR_TYPES.none.ToString();
     ind.TME2MathExpression = string.Empty;
     ind.TME2N        = 0;
     ind.TME2Date     = CalculatorHelpers.GetDateShortNow();
     ind.TME2MathType = MATH_TYPES.none.ToString();
     ind.TME2BaseIO   = ME2Indicator.BASEIO_TYPES.none.ToString();
     ind.TME21Amount  = 0;
     ind.TME21Unit    = string.Empty;
     ind.TME22Amount  = 0;
     ind.TME22Unit    = string.Empty;
     ind.TME25Amount  = 0;
     ind.TME25Unit    = string.Empty;
     ind.TME23Amount  = 0;
     ind.TME23Unit    = string.Empty;
     ind.TME24Amount  = 0;
     ind.TME24Unit    = string.Empty;
 }
예제 #7
0
 public static void AddME2IndicatorToStocks(this ME2IndicatorStock baseStat, ME2Indicator indicator)
 {
     //make sure that each indicator has a corresponding stock
     if (baseStat.ME2IndicatorStocks == null)
     {
         baseStat.ME2IndicatorStocks = new List <ME2IndicatorStock>();
     }
     if (!baseStat.ME2IndicatorStocks
         .Any(s => s.TME2Label == indicator.IndLabel))
     {
         if (indicator.IndLabel != string.Empty)
         {
             ME2IndicatorStock stock = new ME2IndicatorStock(indicator.CalcParameters);
             stock.TME2Description    = indicator.IndDescription;
             stock.TME2Name           = indicator.IndName;
             stock.TME2Label          = indicator.IndLabel;
             stock.TME2Type           = indicator.IndType;
             stock.TME2RelLabel       = indicator.IndRelLabel;
             stock.TME2TAmount        = indicator.IndTAmount;
             stock.TME2TUnit          = indicator.IndTUnit;
             stock.TME2TD1Amount      = indicator.IndTD1Amount;
             stock.TME2TD1Unit        = indicator.IndTD1Unit;
             stock.TME2TD2Amount      = indicator.IndTD2Amount;
             stock.TME2TD2Unit        = indicator.IndTD2Unit;
             stock.TME2MathResult     = indicator.IndMathResult;
             stock.TME2MathSubType    = indicator.IndMathSubType;
             stock.TME2TMAmount       = indicator.IndTMAmount;
             stock.TME2TMUnit         = indicator.IndTMUnit;
             stock.TME2TLAmount       = indicator.IndTLAmount;
             stock.TME2TLUnit         = indicator.IndTLUnit;
             stock.TME2TUAmount       = indicator.IndTUAmount;
             stock.TME2TUUnit         = indicator.IndTUUnit;
             stock.TME2MathOperator   = indicator.IndMathOperator;
             stock.TME2MathExpression = indicator.IndMathExpression;
             stock.TME2Date           = indicator.IndDate;
             stock.TME2MathType       = indicator.IndMathType;
             stock.TME2BaseIO         = indicator.IndBaseIO;
             stock.TME21Amount        = indicator.Ind1Amount;
             stock.TME21Unit          = indicator.Ind1Unit;
             stock.TME22Amount        = indicator.Ind2Amount;
             stock.TME22Unit          = indicator.Ind2Unit;
             stock.TME25Amount        = indicator.Ind5Amount;
             stock.TME25Unit          = indicator.Ind5Unit;
             stock.TME23Amount        = indicator.Ind3Amount;
             stock.TME23Unit          = indicator.Ind3Unit;
             stock.TME24Amount        = indicator.Ind4Amount;
             stock.TME24Unit          = indicator.Ind4Unit;
             //test
             stock.TME2N = 1;
             //add the stock to the basestat
             baseStat.ME2IndicatorStocks.Add(stock);
         }
     }
     else
     {
         //update the identifiers in case they have changed
         ME2IndicatorStock stock = baseStat.ME2IndicatorStocks
                                   .FirstOrDefault(s => s.TME2Label == indicator.IndLabel);
         if (stock != null)
         {
             stock.TME2Description    = indicator.IndDescription;
             stock.TME2Name           = indicator.IndName;
             stock.TME2Label          = indicator.IndLabel;
             stock.TME2Type           = indicator.IndType;
             stock.TME2RelLabel       = indicator.IndRelLabel;
             stock.TME2TAmount        = indicator.IndTAmount;
             stock.TME2TUnit          = indicator.IndTUnit;
             stock.TME2TD1Amount      = indicator.IndTD1Amount;
             stock.TME2TD1Unit        = indicator.IndTD1Unit;
             stock.TME2TD2Amount      = indicator.IndTD2Amount;
             stock.TME2TD2Unit        = indicator.IndTD2Unit;
             stock.TME2MathResult     = indicator.IndMathResult;
             stock.TME2MathSubType    = indicator.IndMathSubType;
             stock.TME2TMAmount       = indicator.IndTMAmount;
             stock.TME2TMUnit         = indicator.IndTMUnit;
             stock.TME2TLAmount       = indicator.IndTLAmount;
             stock.TME2TLUnit         = indicator.IndTLUnit;
             stock.TME2TUAmount       = indicator.IndTUAmount;
             stock.TME2TUUnit         = indicator.IndTUUnit;
             stock.TME2MathOperator   = indicator.IndMathOperator;
             stock.TME2MathExpression = indicator.IndMathExpression;
             stock.TME2Date           = indicator.IndDate;
             stock.TME2MathType       = indicator.IndMathType;
             stock.TME2BaseIO         = indicator.IndBaseIO;
             stock.TME21Amount        = indicator.Ind1Amount;
             stock.TME21Unit          = indicator.Ind1Unit;
             stock.TME22Amount        = indicator.Ind2Amount;
             stock.TME22Unit          = indicator.Ind2Unit;
             stock.TME25Amount        = indicator.Ind5Amount;
             stock.TME25Unit          = indicator.Ind5Unit;
             stock.TME23Amount        = indicator.Ind3Amount;
             stock.TME23Unit          = indicator.Ind3Unit;
             stock.TME24Amount        = indicator.Ind4Amount;
             stock.TME24Unit          = indicator.Ind4Unit;
             //test
             stock.TME2N++;
         }
     }
 }
예제 #8
0
        public void SetTotalME2IndicatorStockAttributes(ME2IndicatorStock ind,
                                                        string attNameExtension, ref XmlWriter writer)
        {
            if (!string.IsNullOrEmpty(ind.TME2Name) && ind.TME2Name != Constants.NONE)
            {
                writer.WriteAttributeString(
                    string.Concat(cTME2Name, attNameExtension), ind.TME2Name);
                writer.WriteAttributeString(
                    string.Concat(cTME2Description, attNameExtension), ind.TME2Description);
                writer.WriteAttributeString(
                    string.Concat(cTME2Label, attNameExtension), ind.TME2Label);
                writer.WriteAttributeString(
                    string.Concat(cTME2Type, attNameExtension), ind.TME2Type);
                writer.WriteAttributeString(
                    string.Concat(cTME2RelLabel, attNameExtension), ind.TME2RelLabel);
                writer.WriteAttributeString(
                    string.Concat(cTME2TAmount, attNameExtension), ind.TME2TAmount.ToString("N4", CultureInfo.InvariantCulture));
                writer.WriteAttributeString(
                    string.Concat(cTME2TUnit, attNameExtension), ind.TME2TUnit.ToString());
                writer.WriteAttributeString(
                    string.Concat(cTME2TD1Amount, attNameExtension), ind.TME2TD1Amount.ToString("N4", CultureInfo.InvariantCulture));
                writer.WriteAttributeString(
                    string.Concat(cTME2TD1Unit, attNameExtension), ind.TME2TD1Unit.ToString());
                writer.WriteAttributeString(
                    string.Concat(cTME2TD2Amount, attNameExtension), ind.TME2TD2Amount.ToString("N4", CultureInfo.InvariantCulture));
                writer.WriteAttributeString(
                    string.Concat(cTME2TD2Unit, attNameExtension), ind.TME2TD2Unit.ToString());
                writer.WriteAttributeString(
                    string.Concat(cTME2MathResult, attNameExtension), ind.TME2MathResult.ToString());
                writer.WriteAttributeString(
                    string.Concat(cTME2MathSubType, attNameExtension), ind.TME2MathSubType.ToString());

                writer.WriteAttributeString(
                    string.Concat(cTME2TMAmount, attNameExtension), ind.TME2TMAmount.ToString("N4", CultureInfo.InvariantCulture));
                writer.WriteAttributeString(
                    string.Concat(cTME2TMUnit, attNameExtension), ind.TME2TMUnit.ToString());
                writer.WriteAttributeString(
                    string.Concat(cTME2TLAmount, attNameExtension), ind.TME2TLAmount.ToString("N4", CultureInfo.InvariantCulture));
                writer.WriteAttributeString(
                    string.Concat(cTME2TLUnit, attNameExtension), ind.TME2TLUnit.ToString());
                writer.WriteAttributeString(
                    string.Concat(cTME2TUAmount, attNameExtension), ind.TME2TUAmount.ToString("N4", CultureInfo.InvariantCulture));
                writer.WriteAttributeString(
                    string.Concat(cTME2TUUnit, attNameExtension), ind.TME2TUUnit.ToString());
                writer.WriteAttributeString(
                    string.Concat(cTME2MathOperator, attNameExtension), ind.TME2MathOperator.ToString());
                writer.WriteAttributeString(
                    string.Concat(cTME2MathExpression, attNameExtension), ind.TME2MathExpression.ToString());
                writer.WriteAttributeString(
                    string.Concat(cTME2N, attNameExtension), ind.TME2N.ToString("N1", CultureInfo.InvariantCulture));
                writer.WriteAttributeString(
                    string.Concat(cTME2Date, attNameExtension), ind.TME2Date.ToString("d", DateTimeFormatInfo.InvariantInfo));
                writer.WriteAttributeString(
                    string.Concat(cTME2MathType, attNameExtension), ind.TME2MathType);
                writer.WriteAttributeString(
                    string.Concat(cTME2BaseIO, attNameExtension), ind.TME2BaseIO);
                writer.WriteAttributeString(
                    string.Concat(cTME21Amount, attNameExtension), ind.TME21Amount.ToString("N4", CultureInfo.InvariantCulture));
                writer.WriteAttributeString(
                    string.Concat(cTME21Unit, attNameExtension), ind.TME21Unit.ToString());
                writer.WriteAttributeString(
                    string.Concat(cTME22Amount, attNameExtension), ind.TME22Amount.ToString("N4", CultureInfo.InvariantCulture));
                writer.WriteAttributeString(
                    string.Concat(cTME22Unit, attNameExtension), ind.TME22Unit);
                writer.WriteAttributeString(
                    string.Concat(cTME25Amount, attNameExtension), ind.TME25Amount.ToString("N4", CultureInfo.InvariantCulture));
                writer.WriteAttributeString(
                    string.Concat(cTME25Unit, attNameExtension), ind.TME25Unit.ToString());
                writer.WriteAttributeString(
                    string.Concat(cTME23Amount, attNameExtension), ind.TME23Amount.ToString("N4", CultureInfo.InvariantCulture));
                writer.WriteAttributeString(
                    string.Concat(cTME23Unit, attNameExtension), ind.TME23Unit);
                writer.WriteAttributeString(
                    string.Concat(cTME24Amount, attNameExtension), ind.TME24Amount.ToString("N4", CultureInfo.InvariantCulture));
                writer.WriteAttributeString(
                    string.Concat(cTME24Unit, attNameExtension), ind.TME24Unit);
            }
        }
예제 #9
0
        public virtual void SetTotalME2IndicatorStockAttributes(ME2IndicatorStock ind,
                                                                string attNameExtension, ref XElement calculator)
        {
            if (!string.IsNullOrEmpty(ind.TME2Name) && ind.TME2Name != Constants.NONE)
            {
                //remember that the calculator inheriting from this class must set id and name atts
                //and remove unwanted old atts i.e. ind.SetCalculatorAttributes(calculator);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2Name, attNameExtension), ind.TME2Name);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2Label, attNameExtension), ind.TME2Label);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2Description, attNameExtension), ind.TME2Description);
                CalculatorHelpers.SetAttributeDateS(calculator,
                                                    string.Concat(cTME2Date, attNameExtension), ind.TME2Date);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2MathType, attNameExtension), ind.TME2MathType);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2BaseIO, attNameExtension), ind.TME2BaseIO);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2Type, attNameExtension), ind.TME2Type);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2RelLabel, attNameExtension), ind.TME2RelLabel);
                CalculatorHelpers.SetAttributeDoubleN4(calculator,
                                                       string.Concat(cTME2TAmount, attNameExtension), ind.TME2TAmount);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2TUnit, attNameExtension), ind.TME2TUnit);
                CalculatorHelpers.SetAttributeDoubleN4(calculator,
                                                       string.Concat(cTME2TD1Amount, attNameExtension), ind.TME2TD1Amount);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2TD1Unit, attNameExtension), ind.TME2TD1Unit);
                CalculatorHelpers.SetAttributeDoubleN4(calculator,
                                                       string.Concat(cTME2TD2Amount, attNameExtension), ind.TME2TD2Amount);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2TD2Unit, attNameExtension), ind.TME2TD2Unit);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2MathResult, attNameExtension), ind.TME2MathResult);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2MathSubType, attNameExtension), ind.TME2MathSubType);

                CalculatorHelpers.SetAttributeDoubleN4(calculator,
                                                       string.Concat(cTME2TMAmount, attNameExtension), ind.TME2TMAmount);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2TMUnit, attNameExtension), ind.TME2TMUnit);
                CalculatorHelpers.SetAttributeDoubleN4(calculator,
                                                       string.Concat(cTME2TLAmount, attNameExtension), ind.TME2TLAmount);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2TLUnit, attNameExtension), ind.TME2TLUnit);
                CalculatorHelpers.SetAttributeDoubleN4(calculator,
                                                       string.Concat(cTME2TUAmount, attNameExtension), ind.TME2TUAmount);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2TUUnit, attNameExtension), ind.TME2TUUnit);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2MathOperator, attNameExtension), ind.TME2MathOperator);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME2MathExpression, attNameExtension), ind.TME2MathExpression);
                CalculatorHelpers.SetAttributeDoubleF2(calculator,
                                                       string.Concat(cTME2N, attNameExtension), ind.TME2N);
                CalculatorHelpers.SetAttributeDoubleN4(calculator,
                                                       string.Concat(cTME25Amount, attNameExtension), ind.TME25Amount);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME25Unit, attNameExtension), ind.TME25Unit);
                CalculatorHelpers.SetAttributeDoubleN4(calculator,
                                                       string.Concat(cTME21Amount, attNameExtension), ind.TME21Amount);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME21Unit, attNameExtension), ind.TME21Unit);
                CalculatorHelpers.SetAttributeDoubleN4(calculator,
                                                       string.Concat(cTME22Amount, attNameExtension), ind.TME22Amount);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME22Unit, attNameExtension), ind.TME22Unit);
                CalculatorHelpers.SetAttributeDoubleN4(calculator,
                                                       string.Concat(cTME23Amount, attNameExtension), ind.TME23Amount);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME23Unit, attNameExtension), ind.TME23Unit);
                CalculatorHelpers.SetAttributeDoubleN4(calculator,
                                                       string.Concat(cTME24Amount, attNameExtension), ind.TME24Amount);
                CalculatorHelpers.SetAttribute(calculator,
                                               string.Concat(cTME24Unit, attNameExtension), ind.TME24Unit);
            }
        }
예제 #10
0
        public string GetTotalME2IndicatorStockProperty(ME2IndicatorStock ind, string attName)
        {
            string sPropertyValue = string.Empty;

            switch (attName)
            {
            case cTME2Description:
                sPropertyValue = ind.TME2Description;
                break;

            case cTME2Name:
                sPropertyValue = ind.TME2Name;
                break;

            case cTME2Type:
                sPropertyValue = ind.TME2Type;
                break;

            case cTME2Label:
                sPropertyValue = ind.TME2Label;
                break;

            case cTME2RelLabel:
                sPropertyValue = ind.TME2RelLabel;
                break;

            case cTME2TAmount:
                sPropertyValue = ind.TME2TAmount.ToString();
                break;

            case cTME2TUnit:
                sPropertyValue = ind.TME2TUnit.ToString();
                break;

            case cTME2TD1Amount:
                sPropertyValue = ind.TME2TD1Amount.ToString();
                break;

            case cTME2TD1Unit:
                sPropertyValue = ind.TME2TD1Unit.ToString();
                break;

            case cTME2TD2Amount:
                sPropertyValue = ind.TME2TD2Amount.ToString();
                break;

            case cTME2TD2Unit:
                sPropertyValue = ind.TME2TD2Unit.ToString();
                break;

            case cTME2MathResult:
                sPropertyValue = ind.TME2MathResult.ToString();
                break;

            case cTME2MathSubType:
                sPropertyValue = ind.TME2MathSubType.ToString();
                break;

            case cTME2TMAmount:
                sPropertyValue = ind.TME2TMAmount.ToString();
                break;

            case cTME2TMUnit:
                sPropertyValue = ind.TME2TMUnit.ToString();
                break;

            case cTME2TLAmount:
                sPropertyValue = ind.TME2TLAmount.ToString();
                break;

            case cTME2TLUnit:
                sPropertyValue = ind.TME2TLUnit.ToString();
                break;

            case cTME2TUAmount:
                sPropertyValue = ind.TME2TUAmount.ToString();
                break;

            case cTME2TUUnit:
                sPropertyValue = ind.TME2TUUnit.ToString();
                break;

            case cTME2MathOperator:
                sPropertyValue = ind.TME2MathOperator.ToString();
                break;

            case cTME2MathExpression:
                sPropertyValue = ind.TME2MathExpression.ToString();
                break;

            case cTME2N:
                sPropertyValue = ind.TME2N.ToString();
                break;

            case cTME2Date:
                sPropertyValue = ind.TME2Date.ToString();
                break;

            case cTME2MathType:
                sPropertyValue = ind.TME2MathType;
                break;

            case cTME21Amount:
                sPropertyValue = ind.TME21Amount.ToString();
                break;

            case cTME21Unit:
                sPropertyValue = ind.TME21Unit.ToString();
                break;

            case cTME22Amount:
                sPropertyValue = ind.TME22Amount.ToString();
                break;

            case cTME22Unit:
                sPropertyValue = ind.TME22Unit;
                break;

            case cTME25Amount:
                sPropertyValue = ind.TME25Amount.ToString();
                break;

            case cTME25Unit:
                sPropertyValue = ind.TME25Unit.ToString();
                break;

            case cTME23Amount:
                sPropertyValue = ind.TME23Amount.ToString();
                break;

            case cTME23Unit:
                sPropertyValue = ind.TME23Unit;
                break;

            case cTME24Amount:
                sPropertyValue = ind.TME24Amount.ToString();
                break;

            case cTME24Unit:
                sPropertyValue = ind.TME24Unit;
                break;

            default:
                break;
            }
            return(sPropertyValue);
        }
예제 #11
0
        public void SetTotalME2IndicatorStockProperty(ME2IndicatorStock ind,
                                                      string attName, string attValue)
        {
            switch (attName)
            {
            case cTME2Description:
                ind.TME2Description = attValue;
                break;

            case cTME2Name:
                ind.TME2Name = attValue;
                break;

            case cTME2Label:
                ind.TME2Label = attValue;
                break;

            case cTME2Type:
                ind.TME2Type = attValue;
                break;

            case cTME2RelLabel:
                ind.TME2RelLabel = attValue;
                break;

            case cTME2TAmount:
                ind.TME2TAmount = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTME2TUnit:
                ind.TME2TUnit = attValue;
                break;

            case cTME2TD1Amount:
                ind.TME2TD1Amount = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTME2TD1Unit:
                ind.TME2TD1Unit = attValue;
                break;

            case cTME2TD2Amount:
                ind.TME2TD2Amount = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTME2TD2Unit:
                ind.TME2TD2Unit = attValue;
                break;

            case cTME2MathResult:
                ind.TME2MathResult = attValue;
                break;

            case cTME2MathSubType:
                ind.TME2MathSubType = attValue;
                break;

            case cTME2TMAmount:
                ind.TME2TMAmount = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTME2TMUnit:
                ind.TME2TMUnit = attValue;
                break;

            case cTME2TLAmount:
                ind.TME2TLAmount = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTME2TLUnit:
                ind.TME2TLUnit = attValue;
                break;

            case cTME2TUAmount:
                ind.TME2TUAmount = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTME2TUUnit:
                ind.TME2TUUnit = attValue;
                break;

            case cTME2MathOperator:
                ind.TME2MathOperator = attValue;
                break;

            case cTME2MathExpression:
                ind.TME2MathExpression = attValue;
                break;

            case cTME2N:
                ind.TME2N = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTME2Date:
                ind.TME2Date = CalculatorHelpers.ConvertStringToDate(attValue);
                break;

            case cTME2MathType:
                ind.TME2MathType = attValue;
                break;

            case cTME21Amount:
                ind.TME21Amount = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTME21Unit:
                ind.TME21Unit = attValue;
                break;

            case cTME22Amount:
                ind.TME22Amount = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTME22Unit:
                ind.TME22Unit = attValue;
                break;

            case cTME25Amount:
                ind.TME25Amount = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTME25Unit:
                ind.TME25Unit = attValue;
                break;

            case cTME23Amount:
                ind.TME23Amount = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTME23Unit:
                ind.TME23Unit = attValue;
                break;

            case cTME24Amount:
                ind.TME24Amount = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTME24Unit:
                ind.TME24Unit = attValue;
                break;

            default:
                break;
            }
        }
예제 #12
0
        public void SetTotalME2IndicatorStockProperties(ME2IndicatorStock ind,
                                                        string attNameExtension, XElement calculator)
        {
            ind.TME2Description = CalculatorHelpers.GetAttribute(calculator,
                                                                 string.Concat(cTME2Description, attNameExtension));
            ind.TME2Name = CalculatorHelpers.GetAttribute(calculator,
                                                          string.Concat(cTME2Name, attNameExtension));
            ind.TME2Label = CalculatorHelpers.GetAttribute(calculator,
                                                           string.Concat(cTME2Label, attNameExtension));
            ind.TME2Type = CalculatorHelpers.GetAttribute(calculator,
                                                          string.Concat(cTME2Type, attNameExtension));
            ind.TME21Amount = CalculatorHelpers.GetAttributeDouble(calculator,
                                                                   string.Concat(cTME21Amount, attNameExtension));
            ind.TME21Unit = CalculatorHelpers.GetAttribute(calculator,
                                                           string.Concat(cTME21Unit, attNameExtension));
            ind.TME2RelLabel = CalculatorHelpers.GetAttribute(calculator,
                                                              string.Concat(cTME2RelLabel, attNameExtension));
            ind.TME2TAmount = CalculatorHelpers.GetAttributeDouble(calculator,
                                                                   string.Concat(cTME2TAmount, attNameExtension));
            ind.TME2TUnit = CalculatorHelpers.GetAttribute(calculator,
                                                           string.Concat(cTME2TUnit, attNameExtension));
            ind.TME2TD1Amount = CalculatorHelpers.GetAttributeDouble(calculator,
                                                                     string.Concat(cTME2TD1Amount, attNameExtension));
            ind.TME2TD1Unit = CalculatorHelpers.GetAttribute(calculator,
                                                             string.Concat(cTME2TD1Unit, attNameExtension));
            ind.TME2TD2Amount = CalculatorHelpers.GetAttributeDouble(calculator,
                                                                     string.Concat(cTME2TD2Amount, attNameExtension));
            ind.TME2TD2Unit = CalculatorHelpers.GetAttribute(calculator,
                                                             string.Concat(cTME2TD2Unit, attNameExtension));
            ind.TME2MathResult = CalculatorHelpers.GetAttribute(calculator,
                                                                string.Concat(cTME2MathResult, attNameExtension));
            ind.TME2MathSubType = CalculatorHelpers.GetAttribute(calculator,
                                                                 string.Concat(cTME2MathSubType, attNameExtension));

            ind.TME2TMAmount = CalculatorHelpers.GetAttributeDouble(calculator,
                                                                    string.Concat(cTME2TMAmount, attNameExtension));
            ind.TME2TMUnit = CalculatorHelpers.GetAttribute(calculator,
                                                            string.Concat(cTME2TMUnit, attNameExtension));
            ind.TME2TLAmount = CalculatorHelpers.GetAttributeDouble(calculator,
                                                                    string.Concat(cTME2TLAmount, attNameExtension));
            ind.TME2TLUnit = CalculatorHelpers.GetAttribute(calculator,
                                                            string.Concat(cTME2TLUnit, attNameExtension));
            ind.TME2TUAmount = CalculatorHelpers.GetAttributeDouble(calculator,
                                                                    string.Concat(cTME2TUAmount, attNameExtension));
            ind.TME2TUUnit = CalculatorHelpers.GetAttribute(calculator,
                                                            string.Concat(cTME2TUUnit, attNameExtension));
            ind.TME2MathOperator = CalculatorHelpers.GetAttribute(calculator,
                                                                  string.Concat(cTME2MathOperator, attNameExtension));
            ind.TME2MathExpression = CalculatorHelpers.GetAttribute(calculator,
                                                                    string.Concat(cTME2MathExpression, attNameExtension));
            ind.TME2N = CalculatorHelpers.GetAttributeDouble(calculator,
                                                             string.Concat(cTME2N, attNameExtension));
            ind.TME2Date = CalculatorHelpers.GetAttributeDate(calculator,
                                                              string.Concat(cTME2Date, attNameExtension));
            ind.TME2MathType = CalculatorHelpers.GetAttribute(calculator,
                                                              string.Concat(cTME2MathType, attNameExtension));
            ind.TME2BaseIO = CalculatorHelpers.GetAttribute(calculator,
                                                            string.Concat(cTME2BaseIO, attNameExtension));
            ind.TME22Amount = CalculatorHelpers.GetAttributeDouble(calculator,
                                                                   string.Concat(cTME22Amount, attNameExtension));
            ind.TME22Unit = CalculatorHelpers.GetAttribute(calculator,
                                                           string.Concat(cTME22Unit, attNameExtension));
            ind.TME25Amount = CalculatorHelpers.GetAttributeDouble(calculator,
                                                                   string.Concat(cTME25Amount, attNameExtension));
            ind.TME25Unit = CalculatorHelpers.GetAttribute(calculator,
                                                           string.Concat(cTME25Unit, attNameExtension));
            ind.TME23Amount = CalculatorHelpers.GetAttributeDouble(calculator,
                                                                   string.Concat(cTME23Amount, attNameExtension));
            ind.TME23Unit = CalculatorHelpers.GetAttribute(calculator,
                                                           string.Concat(cTME23Unit, attNameExtension));
            ind.TME24Amount = CalculatorHelpers.GetAttributeDouble(calculator,
                                                                   string.Concat(cTME24Amount, attNameExtension));
            ind.TME24Unit = CalculatorHelpers.GetAttribute(calculator,
                                                           string.Concat(cTME24Unit, attNameExtension));
        }