コード例 #1
0
        private void RefreshData()
        {
            DoctorSolClient doctorSolClient = Extensions.Extensions.GetDoctorSolClient();

            bindingSourceDoctor.DataSource = doctorSolClient.Doctors(true);
            doctorSolClient.Close();

            DoctorMailSolClient doctorMailSolClient = Extensions.Extensions.GetDoctorMailClient();

            bindingSourceMail.DataSource = doctorMailSolClient.DoctorMails(true);
            doctorMailSolClient.Close();


            DoctorPhoneSolClient doctorPhoneSolClient = Extensions.Extensions.GetDoctorPhoneSolClient();

            bindingSourcePhone.DataSource = doctorPhoneSolClient.DoctorPhones(true);

            doctorPhoneSolClient.Close();
        }
コード例 #2
0
        public static DoctorMailSolClient GetDoctorMailClient()
        {
            DoctorMailSolClient client;

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

            return(client);
        }