Example #1
0
        void sc_DelModelByIDCompleted(object sender, DelModelByIDCompletedEventArgs e)
        {
            if (e.Result < 0)
            {
                MessageBox.Show("删除失败!");

                return;
            }

            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.GetModelAsync(UserID, PlayTypeID, TypeName);
            mc.GetModelCompleted += new EventHandler<GetModelCompletedEventArgs>(sc_GetModelCompleted);
        }
Example #2
0
        void sc_DelModelByIDCompleted(object sender, DelModelByIDCompletedEventArgs e)
        {
            if (e.Result < 0)
            {
                MessageBox.Show("删除失败!");

                return;
            }

            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.GetModelAsync(UserID, PlayTypeID, TypeName);
            mc.GetModelCompleted += new EventHandler <GetModelCompletedEventArgs>(sc_GetModelCompleted);
        }