private void MenuGetHisPosStatics_Click(object sender, RoutedEventArgs e) { string strFlag = TbFlag.Text; int nFlag = Convert.ToInt32(strFlag); string strSecondName = TbSecondName.Text; string strThirdName = TbThirdName.Text; string strFourthName = TbFourthName.Text; PositionList[] lst = client.GetHistoryPositonStatistics(nFlag, strSecondName, strThirdName, strFourthName); string strResult = ""; if (lst != null && lst.Count() > 0) { int nCount = lst.Count(); for (int i = 0; i < nCount; i++) { PositionList item = lst[i]; strResult += "{\"Name\":\"" + item.Name + "\",\"Count\":" + item.Count + "\"},\r\n"; } } TbPosStaticsResult.Text = strResult; }