Esempio n. 1
0
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.None);
            binding.MaxReceivedMessageSize = int.MaxValue;
            binding.MaxBufferSize = int.MaxValue;
            ModelClient mc = new ModelClient(binding, new EndpointAddress(new Uri(Application.Current.Host.Source, "../Silverlight/Model.svc")));

            //通过id获取详细信息    
            mc.GetModelByIDAsync(ID);
            mc.GetModelByIDCompleted += new EventHandler<GetModelByIDCompletedEventArgs>(sc_GetModelByIDCompleted);
        }
Esempio n. 2
0
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.None);

            binding.MaxReceivedMessageSize = int.MaxValue;
            binding.MaxBufferSize          = int.MaxValue;
            ModelClient mc = new ModelClient(binding, new EndpointAddress(new Uri(Application.Current.Host.Source, "../Silverlight/Model.svc")));

            //通过id获取详细信息
            mc.GetModelByIDAsync(ID);
            mc.GetModelByIDCompleted += new EventHandler <GetModelByIDCompletedEventArgs>(sc_GetModelByIDCompleted);
        }