Ejemplo n.º 1
0
        private bool CallService(InParams inparams, OutParams outparams)
        {
            DateTime begin = DateTime.Now;

            try
            {
                toolStripStatusLabel_time.Text = "正在调用远程服务,请稍候...";
                statusStrip_state.Update();
                inparams.SetRouteType(textBox_routeType.Text);
                SDPClient.RouteService(inparams, outparams);
                toolStripStatusLabel_time.Text = String.Format("远程服务执行成功,耗时:{0:c}", DateTime.Now - begin);
                ShowServiceResult(outparams);
                return(true);
            }
            catch (Exception e)
            {
                toolStripStatusLabel_time.Text = String.Format("远程服务执行失败,耗时:{0:c}", DateTime.Now - begin);
                richTextBox_result.Text        = String.Format("远程服务执行失败:\n\r{0}", e);
                ClearResultPage();
                return(false);
            }
        }