public void GetPhotoList(string jsonData) { string AlbumNo = ""; Dictionary <string, object> json = (Dictionary <string, object>)serializer.DeserializeObject(jsonData); if (!string.IsNullOrEmpty(json["AlbumNo"].ToString())) { AlbumNo = json["AlbumNo"].ToString(); int _pagesize = 10; int _page = 1; if (json["Size"] != DBNull.Value && !string.IsNullOrEmpty(json["Size"].ToString())) { _pagesize = Convert.ToInt32(json["Size"]); } if (json["Page"] != DBNull.Value && !string.IsNullOrEmpty(json["Page"].ToString())) { _page = Convert.ToInt32(json["Page"]); } WebServiceHelper.PhotoManagerHelper manager = new WebServiceHelper.PhotoManagerHelper(); List <PhotoInfo> _photos = manager.GetPhotosByPage(AlbumNo, _page, _pagesize); string strJsonData = ObjectToJSON.Instance.GetJsonString(_photos); ResponseControl.Instance.OutPutjson("{ \"result\" : \"true\",\"message\":\"执行成功\",\"Data\":" + strJsonData + " }"); } else { ResponseControl.Instance.OutPutjson("{ \"result\" : \"true\",\"message\":\"执行失败,参数格式错误!\",\"Data\":}"); } }
public void GetPhotoData(string jsonData) { string strPhotoNo = ""; Dictionary <string, object> json = (Dictionary <string, object>)serializer.DeserializeObject(jsonData); if (!string.IsNullOrEmpty(json["PhotoNo"].ToString())) { strPhotoNo = json["PhotoNo"].ToString(); WebServiceHelper.PhotoManagerHelper manager = new WebServiceHelper.PhotoManagerHelper(); string MiniImgData = ObjectToJSON.Instance.GetJsonString(manager.GetPhotoImgData(strPhotoNo)); ResponseControl.Instance.OutPutjson("{ \"result\" : \"true\",\"message\":\"执行成功\",\"Data\":" + MiniImgData + " }"); } else { ResponseControl.Instance.OutPutjson("{ \"result\" : \"true\",\"message\":\"执行失败,参数格式错误!\",\"Data\":}"); } }
public void GetMiniPhotoData(string jsonData) { string strPhotoNo = ""; Dictionary<string, object> json = (Dictionary<string, object>)serializer.DeserializeObject(jsonData); if (!string.IsNullOrEmpty(json["PhotoNo"].ToString())) { strPhotoNo = json["PhotoNo"].ToString(); WebServiceHelper.PhotoManagerHelper manager = new WebServiceHelper.PhotoManagerHelper(); string MiniImgData = ObjectToJSON.Instance.GetJsonString(manager.GetPhotoMiniImgData(strPhotoNo)); ResponseControl.Instance.OutPutjson("{ \"result\" : \"true\",\"message\":\"执行成功\",\"Data\":" + MiniImgData + " }"); } else { ResponseControl.Instance.OutPutjson("{ \"result\" : \"true\",\"message\":\"执行失败,参数格式错误!\",\"Data\":}"); } }
public void GetPhotoList(string jsonData) { string AlbumNo = ""; Dictionary<string, object> json = (Dictionary<string, object>)serializer.DeserializeObject(jsonData); if (!string.IsNullOrEmpty(json["AlbumNo"].ToString())) { AlbumNo = json["AlbumNo"].ToString(); int _pagesize = 10; int _page = 1; if (json["Size"] != DBNull.Value && !string.IsNullOrEmpty(json["Size"].ToString())) { _pagesize = Convert.ToInt32(json["Size"]); } if (json["Page"] != DBNull.Value && !string.IsNullOrEmpty(json["Page"].ToString())) { _page = Convert.ToInt32(json["Page"]); } WebServiceHelper.PhotoManagerHelper manager = new WebServiceHelper.PhotoManagerHelper(); List<PhotoInfo> _photos = manager.GetPhotosByPage(AlbumNo,_page,_pagesize); string strJsonData = ObjectToJSON.Instance.GetJsonString(_photos); ResponseControl.Instance.OutPutjson("{ \"result\" : \"true\",\"message\":\"执行成功\",\"Data\":" + strJsonData + " }"); } else { ResponseControl.Instance.OutPutjson("{ \"result\" : \"true\",\"message\":\"执行失败,参数格式错误!\",\"Data\":}"); } }