private void refreshTable() { List <AccountType> accountList = new List <AccountType>(); HttpHandler handler = new HttpHandler(DAO.sConsoleUrl); ConsoleCodeUpTransmissionType up = new ConsoleCodeUpTransmissionType(); up.mCode = "11P1"; up.mParamL = StdMd5Maker.toMd5String(DAO.sUserName + DAO.sPassword); up.mParamU = "RPAT&" + (sPageSize * mPageNo).ToString() + "&" + sPageSize.ToString(); handler.goSingleAsync(up, "POST", new Action <ConsoleCodeDownTransmissionType, HttpHandlerException>( delegate(ConsoleCodeDownTransmissionType idDown, HttpHandlerException idE) { if (!idE.IsOK()) { this.Dispatcher.Invoke(new Action(delegate { mHttpState.Content = idE.getMessage(); })); return; } string[] idGrp = idDown.mServiceAnwser.Split('&'); foreach (string id in idGrp) { if (id.Equals("")) { break; } AccountType account = new AccountType(Convert.ToInt32(id)); accountList.Add(account); } this.Dispatcher.Invoke(new Action(delegate { mAccountTable.ItemsSource = accountList; mHttpState.Content = "OK"; })); })); }