private void button2_Click(object sender, EventArgs e) { using (OrderPortalService.OrderPortalService ops = new OrderPortalService.OrderPortalService()) { ops.Url = textBox1.Text; try { CustomerOrderInfoDoc coi = ops.GetCustomerOrderInfo("partner", "EN", "IMISTD", "JOPL_060725_02", null); if (coi != null) { if (coi.aCustomerOrderList != null) { label2.Text = Convert.ToString(coi.aCustomerOrderList.GetLength(0)); } else { label2.Text = "null"; } } else { label2.Text = "Failed"; } } catch (Exception ex) { label2.Text = ex.ToString(); } } }
private bool callit(string partnername) { bool result = false; using (OrderPortalService.OrderPortalService ops = new OrderPortalService.OrderPortalService()) { ops.Url = textBox1.Text; try { CustomerOrderInfoDoc coi = ops.GetCustomerOrderInfo(partnername, "EN", "IMISTD", "JOPL_060725_02", null); if (coi != null) { if (coi.aCustomerOrderList != null) { result = true; } } } catch (Exception ex) { } } return(result); }