private void btnBuscar_Click(object sender, EventArgs e) { try { MonitorCustodiaResponse lResponse = lServico.ObterMonitorCustodiaMemoria(new Lib.Mensageria.MonitorCustodiaRequest() { CodigoCliente = int.Parse(txtCliente.Text) }); if (lResponse.MonitorCustodia != null) { MessageBox.Show("Retornou dados", "Retornou dados", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } catch (Exception ex) { throw ex; } }
private void button1_Click(object sender, EventArgs e) { var lRequest = new MonitorCustodiaRequest(); lRequest.CodigoCliente = int.Parse(textBox1.Text); //var lRequest = new MonitorCustodiaRequest(); //var lRequest = new MonitorCustodiaRequest(); DateTime time = DateTime.Now; var lResponse = lServico.ObterMonitorCustodiaMemoria(lRequest); if (lResponse != null) { double lSeconds = (DateTime.Now - time).TotalSeconds; MessageBox.Show("Segundos que demorou -> " + lSeconds); } lServico.ClearMonitorCustodiaMemoria(); }