Exemple #1
0
 public static string SelectBarCode(string barcode)
 {
     try
     {
         cn.com.sokan.pdm.WebServiceInterface ws = new cn.com.sokan.pdm.WebServiceInterface();
         JObject SelectObj = new JObject
         {
             { "BarCode", barcode }
         };
         string type    = "TblMaterailBarCode_List";
         string jsonobj = JsonHelper.JsonEncode(SelectObj, false);
         cn.com.sokan.pdm.BackResult list = ws.call(type, jsonobj);
         if (list.Success == true)
         {
             return(list.BackObj);   //返回结果集,类型为数组
         }
         else
         {
             return("访问失败");
         }
     }
     catch
     {
         return("访问异常");
     }
 }
Exemple #2
0
 public static void InsertBarCodeASync(string json)
 {
     Task.Factory.StartNew(() =>
     {
         try
         {
             cn.com.sokan.pdm.WebServiceInterface ws = new cn.com.sokan.pdm.WebServiceInterface();
             string type = "TblMaterailBarCode_Insert";
             //JObject InsertObj = new JObject(json);
             //string jsonobj = JsonHelper.JsonEncode(InsertObj, false);
             cn.com.sokan.pdm.BackResult list = ws.call(type, json);
         }
         catch
         {
         }
     });
 }