/// <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; } }
/// <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; } }
/// <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; } }
/// <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; } }
/// <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; } }
/// <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; } }
/// <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; } }
/// <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; } }
/// <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; } }
/// <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; } }