예제 #1
0
        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);
        }
예제 #2
0
        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();
        }
예제 #3
0
        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);
            }
        }