Exemplo n.º 1
0
 public ActionResult Select()
 {
     using (WebService1Reference.WebService1SoapClient client = new WebService1Reference.WebService1SoapClient())
     {
         var a = client.Select(null);
         return(Json(a, JsonRequestBehavior.AllowGet));//从webservice中获取json数据
     }
 }
Exemplo n.º 2
0
        public ActionResult ShowEdit()
        {
            string id = Request["rowsid"];

            using (WebService1Reference.WebService1SoapClient client = new WebService1Reference.WebService1SoapClient())
            {
                var a = client.Select(id);
                return(Json(a, JsonRequestBehavior.AllowGet));
            }
        }
Exemplo n.º 3
0
        public ActionResult Delete()
        {
            string strId = Request["strId"];

            using (WebService1Reference.WebService1SoapClient client = new WebService1Reference.WebService1SoapClient())
            {
                client.Delete(strId);
            }
            return(Content("ok"));
        }
Exemplo n.º 4
0
 public ActionResult SoapHeader()
 {
     using (WebService1Reference.WebService1SoapClient client = new WebService1Reference.WebService1SoapClient())
     {
         ViewBag.SoapHeaderMsg = client.CustomSoapHeaderTest(new SOAWebApp.WebService1Reference.CustomSoapHeader()//SoapHeader验证
         {
             UserName = "******",
             PassWord = "******"
         });
     }
     return(View());
 }
Exemplo n.º 5
0
 public ActionResult Edit(Contact contact)
 {
     SOAWebApp.WebService1Reference.Contact contact1 = new WebService1Reference.Contact()
     {
         Name         = contact.Name,
         PhoneNo      = contact.PhoneNo,
         EmailAddress = contact.EmailAddress,
         Address      = contact.Address
     };
     using (WebService1Reference.WebService1SoapClient client = new WebService1Reference.WebService1SoapClient())
     {
         client.Update(contact1);
     }
     return(Content("ok"));
 }