/// <summary> /// 初始化没有条件 /// </summary> /// <param name="page"></param> /// <param name="size"></param> /// <returns></returns> public static ResultJson <ResponseInfoListModel> getAll(int page, int size) { try { string url = UrlModel.ip + UrlModel.nucleic; RequestInfoListModel requestLoginModel = new RequestInfoListModel(page, size); string result = HttpUrlConfig.GetQuery(url, requestLoginModel); ResultJson <ResponseInfoListModel> retStu = JsonConvert.DeserializeObject <ResultJson <ResponseInfoListModel> >(result); Logger.Default.Info(result); return(retStu); } catch (Exception ex) { Logger.Default.Error(ex.Message); return(null); } }
/// <summary> /// 条件查询 /// </summary> /// <param name="page"></param> /// <param name="size"></param> /// <returns></returns> public static ResultJson <ResponseInfoListModel> getQuery(RequestInfoListModel re) { try { string url = UrlModel.ip + UrlModel.nucleic; string result = HttpUrlConfig.GetQuery(url, re); ResultJson <ResponseInfoListModel> retStu = JsonConvert.DeserializeObject <ResultJson <ResponseInfoListModel> >(result); Logger.Default.Info(result); return(retStu); } catch (Exception ex) { Logger.Default.Error(ex.Message); return(new ResultJson <ResponseInfoListModel>() { code = "1", message = "查无结果" }); } }
/// <summary> /// 删除检测 /// </summary> /// <param name="requestNucleic"></param> /// <returns></returns> public static ResultJson <string> deleteNucleic(InfoListModel requestNucleic) { try { string url = UrlModel.ip + UrlModel.nucleic_delete; string result = HttpUrlConfig.GetQuery(url, requestNucleic); ResultJson <string> retStu = JsonConvert.DeserializeObject <ResultJson <string> >(result); Logger.Default.Info(result); return(retStu); } catch (Exception ex) { Logger.Default.Error(ex.Message); return(new ResultJson <string>() { code = "1", message = "删除失败,请稍后重试" }); } }