示例#1
0
 /// <summary>
 /// 获取本地更新数据
 /// </summary>
 /// <returns></returns>
 public static DataSet GetLocalCache()
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "CommonService.asmx";
             object[] args      = new object[1];
             args[0] = WSInfo.SPassword;
             object oResult = BESService.InvokeWebService(WsFullURL, "GetLocalCache", args);
             return(oResult as DataSet);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#2
0
 /// <summary>
 /// 获取服务器时间
 /// </summary>
 public static DateTime GetServerTime()
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "CommonService.asmx";
             string[] args      = new string[1];
             args[0] = WSInfo.SPassword;
             object oResult = BESService.InvokeWebService(WsFullURL, "GetServerTime", args);
             return((DateTime)oResult);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#3
0
 /// <summary>
 /// 获取系统缓存
 /// </summary>
 /// <param name="UserName"></param>
 /// <returns></returns>
 public static BES.Entities.DevCache GetCache(String UserName)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "CommonService.asmx";
             object[] args      = new object[2];
             args[0] = UserName;
             args[1] = WSInfo.SPassword;
             object oResult = BESService.InvokeWebService(WsFullURL, "GetCache", args);
             return(CommonHelper.DeSerialize(typeof(BES.Entities.DevCache), oResult.ToString()) as BES.Entities.DevCache);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#4
0
 /// <summary>
 /// 删除数据
 /// </summary>
 /// <param name="PLUCODE"></param>
 /// <returns></returns>
 public static bool Delete(String PLUCODE)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "PLUService.asmx";
             string[] args      = new string[2];
             args[0] = PLUCODE;
             args[1] = WSInfo.SPassword;
             object oResult = BESService.InvokeWebService(WsFullURL, "Delete", args);
             return((bool)oResult);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#5
0
 /// <summary>
 /// 获得数据列表
 /// </summary>
 public static DataSet GetList(string strWhere)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "PLUService.asmx";
             string[] args      = new string[2];
             args[0] = strWhere;
             args[1] = WSInfo.SPassword;
             object oResult = BESService.InvokeWebService(WsFullURL, "GetList", args);
             return(oResult as DataSet);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#6
0
 /// <summary>
 /// 更新操作
 /// </summary>
 /// <param name="strModel"></param>
 /// <returns></returns>
 public static bool Update(BES.Entities.PLU model)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "PLUService.asmx";
             string[] args      = new string[2];
             args[0] = CommonHelper.Serialize(model);
             args[1] = WSInfo.SPassword;
             object oResult = BESService.InvokeWebService(WsFullURL, "Update", args);
             return((bool)oResult);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#7
0
 /// <summary>
 /// 获取封面图片
 /// </summary>
 /// <param name="BookID"></param>
 /// <returns></returns>
 public static Byte[] GetCover(String BookID)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "PLUService.asmx";
             string[] args      = new string[2];
             args[0] = BookID;
             args[1] = WSInfo.SPassword;
             object oResult = BESService.InvokeWebService(WsFullURL, "GetCover", args);
             return((Byte[])oResult);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#8
0
 /// <summary>
 /// 保存图片
 /// </summary>
 /// <param name="listPhotoFile"></param>
 /// <returns></returns>
 public static bool AddImageList(List <BES.Entities.PhotoFile> listPhotoFile)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "PLUService.asmx";
             string[] args      = new string[2];
             args[0] = Common.CommonHelper.Serialize(listPhotoFile);
             args[1] = WSInfo.SPassword;
             object oResult = BESService.InvokeWebService(WsFullURL, "AddImageList", args);
             return((bool)oResult);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#9
0
 /// <summary>
 /// 获取多个对象
 /// </summary>
 /// <param name="Where"></param>
 /// <param name="WSPassword"></param>
 /// <returns></returns>
 public static List <BES.Entities.PLU> GetModelList(String Where)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "PLUService.asmx";
             string[] args      = new string[2];
             args[0] = Where;
             args[1] = WSInfo.SPassword;
             object oResult = BESService.InvokeWebService(WsFullURL, "GetModelList", args);
             return(CommonHelper.DeSerialize(typeof(List <BES.Entities.PLU>), oResult.ToString()) as List <BES.Entities.PLU>);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#10
0
 /// <summary>
 /// 检查用名是否存在
 /// </summary>
 public static bool CheckUserName(string UserName)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "UserService.asmx";
             string[] args      = new string[2];
             args[0] = UserName;
             args[1] = WSInfo.SPassword;
             object oResult = BESService.InvokeWebService(WsFullURL, "CheckUserName", args);
             return((bool)oResult);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }