public static LaboratoryRequestItemSolClient GetLaboratoryRequestItem() { LaboratoryRequestItemSolClient client; try { client = new LaboratoryRequestItemSolClient(binding, new EndpointAddress(String.Format(GlobalVariables.ServiceRoot + "/{0}", "LaboratoryRequestItemService.svc"))); client.Select(-1); } catch (Exception) { bool b = Program.TestService(); if (!b) { Application.Exit(); } client = new LaboratoryRequestItemSolClient(binding, new EndpointAddress(String.Format(GlobalVariables.ServiceRoot + "/{0}", "LaboratoryRequestItemService.svc"))); } return(client); }
private void bindingSourceLabResult_CurrentChanged(object sender, EventArgs e) { LaboratoryRequest laboratoryRequest = bindingSourceLabResult.Current as LaboratoryRequest; if (laboratoryRequest.IsNull()) { bindingSourceItems.DataSource = null; return; } LaboratoryRequestItemSolClient client = Extensions.Extensions.GetLaboratoryRequestItem(); bindingSourceItems.DataSource = client.LaboratoryRequestItems(laboratoryRequest.Id); client.Close(); }
private void bindingSourceLabRequests_CurrentChanged(object sender, EventArgs e) { if (opensplash) { Extensions.Extensions.ShowWaitForm(); } LaboratoryRequest laboratoryRequest = bindingSourceLabRequests.Current as LaboratoryRequest; if (laboratoryRequest.IsNull()) { bindingSourceResults.DataSource = null; return; } LaboratoryRequestItemSolClient client = Extensions.Extensions.GetLaboratoryRequestItem(); bindingSourceResults.DataSource = client.LaboratoryRequestItems(laboratoryRequest.Id); client.Close(); gridControlLabResults.Refresh(); if (opensplash) { SplashScreenManager.CloseForm(false); } }