Exemplo n.º 1
0
        private void btn_Del_Click(object sender, RoutedEventArgs e)
        {
            Button b = sender as Button;
            string t = b.Tag.ToString();

            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.DelModelByIDAsync(long.Parse(t));
            mc.DelModelByIDCompleted += new EventHandler<DelModelByIDCompletedEventArgs>(sc_DelModelByIDCompleted);
        }
Exemplo n.º 2
0
        private void btn_Del_Click(object sender, RoutedEventArgs e)
        {
            Button b = sender as Button;
            string t = b.Tag.ToString();

            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.DelModelByIDAsync(long.Parse(t));
            mc.DelModelByIDCompleted += new EventHandler <DelModelByIDCompletedEventArgs>(sc_DelModelByIDCompleted);
        }