private void QueryTableCallBack(string resultStr, string resultError) { string[] rows = resultStr.Split(';'); int rowIndex = 0; foreach (string row in rows) { if (row.Length > 0) { string[] cells = row.Split(','); foreach (string cell in cells) { string[] keyvalue = cell.Split(':'); if (keyvalue.Length != 2 || keyvalue[1] == null || keyvalue[1].Length == 0) { continue; } switch (_queryoperate) { case QueryOperate.QueryOperate_LineChart: case QueryOperate.QueryOperate_PieChart: case QueryOperate.QueryOperate_HistogramChart: { LineChartServer.SetCurvePointInfo(_lineCharIndex, rowIndex, Convert.ToInt32(keyvalue[1])); if (rowIndex < 3) { int clr0_1 = Color.BlueViolet.ToArgb() + 100 * (rowIndex + 0); int clr0_2 = Color.BlueViolet.ToArgb() + 100 * (rowIndex + 1); int clr0_3 = Color.BlueViolet.ToArgb() + 100 * (rowIndex + 2); int clr0_4 = Color.BlueViolet.ToArgb() + 100 * (rowIndex + 3); PieChartServer.SetPieBasicInfo(_pieCharIndex, rowIndex, Convert.ToInt32(keyvalue[1]), clr0_1, clr0_2, clr0_3, clr0_4 ); } int clr1 = Color.BlueViolet.ToArgb() + 100 * rowIndex; HistogramServer.SetHistogramBasicInfo(_lineCharIndex, rowIndex, Convert.ToInt32(keyvalue[1]), clr1); } break; } rowIndex++; } } } PieChartServer.RedrawChart(_pieCharIndex); LineChartServer.RedrawChart(_lineCharIndex); HistogramServer.RedrawChart(_histogramCharIndex); _queryoperate = QueryOperate.QueryOperate_None; }
private void QueryTableCallBack(string resultStr, string errorStr) { string[] rows = resultStr.Split(';'); foreach (string row in rows) { if (row.Length > 0) { string[] cells = row.Split(','); foreach (string cell in cells) { string[] keyvalue = cell.Split(':'); if (keyvalue.Length != 2 || keyvalue[1] == null || keyvalue[1].Length == 0) { continue; } LineChartServer.SetCurvePointInfo(_lineCharIndex, Convert.ToInt32(keyvalue[0]), Convert.ToInt32(keyvalue[1])); { int rowIndex = Convert.ToInt32(keyvalue[0]); int clr0_1 = Color.Azure.ToArgb() + 100 * (rowIndex + 0); int clr0_2 = Color.Azure.ToArgb() + 100 * (rowIndex + 1); int clr0_3 = Color.Azure.ToArgb() + 100 * (rowIndex + 2); int clr0_4 = Color.Azure.ToArgb() + 100 * (rowIndex + 3); PieChartServer.SetPieBasicInfo(_pieCharIndex, Convert.ToInt32(keyvalue[0]), (float)(Convert.ToDouble(keyvalue[1])), clr0_1, clr0_2, clr0_3, clr0_4 ); } { int rowIndex = Convert.ToInt32(keyvalue[0]); int clr1 = Color.BlueViolet.ToArgb() + 100 * rowIndex; HistogramServer.SetHistogramBasicInfo(_lineCharIndex, Convert.ToInt32(keyvalue[0]), Convert.ToInt32(keyvalue[1]), clr1); } } } } PieChartServer.RedrawChart(_pieCharIndex); LineChartServer.RedrawChart(_lineCharIndex); HistogramServer.RedrawChart(_histogramCharIndex); }
private void QueryTableCallBack(string resultStr, string errorStr) { string[] rows = resultStr.Split(';'); foreach (string row in rows) { if (row.Length > 0) { string[] cells = row.Split(','); foreach (string cell in cells) { string[] keyvalue = cell.Split(':'); if (keyvalue.Length != 2 || keyvalue[1] == null || keyvalue[1].Length == 0) { continue; } switch (_queryoperate) { case QueryOperate.QueryOperate_Guzhang: totalSheBeiGuZhang = keyvalue[1]; break; case QueryOperate.QueryOperate_Yewu: totalBanLiYeWu = keyvalue[1]; break; case QueryOperate.QueryOperate_Hongkong: totalXiangGangWangLai = keyvalue[1]; break; case QueryOperate.QueryOperate_Taiwan: totalTaiWanWangLai = keyvalue[1]; break; case QueryOperate.QueryOperate_SheBeiZaiXian: totalSheBeiZaiXian = keyvalue[1]; break; case QueryOperate.QueryOperate_GuanLiCnt: totalGuanLiCiShu = keyvalue[1]; break; case QueryOperate.QueryOperate_LineChart: LineChartServer.SetCurvePointInfo(_lineCharIndex, Convert.ToInt32(keyvalue[0]), Convert.ToInt32(keyvalue[1])); break; case QueryOperate.QueryOperate_OccupancyChart: OccupancyChartServer.SetOccupancyBasicInfo(_occupancyCharIndex, Convert.ToInt32(keyvalue[0]), Convert.ToInt32(keyvalue[1])); break; case QueryOperate.QueryOperate_PieChart: { int rowIndex = Convert.ToInt32(keyvalue[0]); int clr0_1 = Color.Azure.ToArgb() + 100 * (rowIndex + 0); int clr0_2 = Color.Azure.ToArgb() + 100 * (rowIndex + 1); int clr0_3 = Color.Azure.ToArgb() + 100 * (rowIndex + 2); int clr0_4 = Color.Azure.ToArgb() + 100 * (rowIndex + 3); PieChartServer.SetPieBasicInfo(_pieCharIndex, Convert.ToInt32(keyvalue[0]), (float)(Convert.ToDouble(keyvalue[1])), clr0_1, clr0_2, clr0_3, clr0_4 ); } break; case QueryOperate.QueryOperate_HistogramChart: { int rowIndex = Convert.ToInt32(keyvalue[0]); int clr1 = Color.BlueViolet.ToArgb() + 100 * rowIndex; HistogramServer.SetHistogramBasicInfo(_lineCharIndex, Convert.ToInt32(keyvalue[0]), Convert.ToInt32(keyvalue[1]), clr1); } break; } } } } PieChartServer.RedrawChart(_pieCharIndex); LineChartServer.RedrawChart(_lineCharIndex); HistogramServer.RedrawChart(_histogramCharIndex); OccupancyChartServer.RedrawChart(_occupancyCharIndex); _queryoperate = QueryOperate.QueryOperate_None; }