public string GetUrl_Chart(EpmDataTypeChart chartType, string chartCurrency) { // build url with params for chart group by and currency string chartTypeAdjustedForHanaSP = chartType.ToString(); if (_hanaVersion == HanaVersion.v1_00_70) { chartTypeAdjustedForHanaSP = chartTypeAdjustedForHanaSP.ToUpperInvariant(); } string url = _urlEpmBase + string.Format(_urlEnd_EpmChart, chartTypeAdjustedForHanaSP, chartCurrency); return url; }
/// <summary> /// Calls HANA server and asynchronously gets data, raising appropriate event On*Changed when done. /// Results can later be retreived using GetEpmResponse_Chart. /// Handles fieldname case correctly (HANA SP6 is eg PurchaseOrderId vs HANA SP7 PURCHASEORDERID) /// </summary> public void GetEpmData_Chart(EpmDataTypeChart chartType, string chartCurrency) { string url = _verTranslator.GetUrl_Chart(chartType, chartCurrency); _epmDataChartTypeRequested = chartType; // Asynch call will eventually populate _epmDataChart GetWwwData(url, WwwDataType.EpmChartGroup); }
/// <summary> /// can only be used after Start called since it relies on finding the title gameobject /// </summary> public void ChangeChartType(EpmDataTypeChart newChartType) { ChartDataType = newChartType; // ensures next time refresh is pressed we listen to correct data from gamemanager ChartData.ChartTitle = newChartType.ToString(); SetTitle(ChartData.ChartTitle); }