Ejemplo n.º 1
0
        public static MessageSolClient GetMessageService()
        {
            MessageSolClient client;

            try
            {
                client = new MessageSolClient(binding,
                                              new EndpointAddress(String.Format(GlobalVariables.ServiceRoot + "/{0}", "messageservice.svc")));
                client.Select(-1);
            }
            catch (Exception)
            {
                bool b = Program.TestService();
                if (!b)
                {
                    Application.Exit();
                }
                client = new MessageSolClient(binding,
                                              new EndpointAddress(String.Format(GlobalVariables.ServiceRoot + "/{0}", "messageservice.svc")));
            }

            return(client);
        }
Ejemplo n.º 2
0
        private void simpleButtonLastExams_Click(object sender, EventArgs e)
        {
            if (examination.IsNull())
            {
                return;
            }

            ExaminationSolClient client = Extensions.Extensions.GetExaminationService();

            if (client.IsNull())
            {
                return;
            }
            MessageSolClient messageService = Extensions.Extensions.GetMessageService();

            Extensions.Extensions.ShowWaitForm(description: "Geçmiş muayene bilgileri sorgulanıyor");
            bindingSourcePastExaminations.DataSource = client.Examinations(null, GlobalVariables.Doctor.Id,
                                                                           examination.PatientId, false, true);
            gridControlPastExaminations.Refresh();
            bindingSourceMessages.DataSource = messageService.Messages(GlobalVariables.Doctor.Id, examination.PatientId,
                                                                       true);
            gridControlMessages.Refresh();
            SplashScreenManager.CloseForm(false);
        }