/// <summary> /// 根据性质获取种类 /// </summary> /// <returns></returns> public BasicResponse <DataTable> GetClassByProperty(GetClassByPropertyRequest alarmRequest) { var response = new BasicResponse <DataTable>(); try { response.Data = _Repository.GetClassByProperty(alarmRequest.Type); } catch (Exception ex) { response.Code = -100; response.Message = ex.Message; this.ThrowException("根据性质获取种类", ex); } return(response); }
/// <summary> /// 根据性质获取种类 /// </summary> /// <param name="sProperty">性质</param> /// <returns></returns> public static DataTable GetClassByProperty(string sProperty) { DataTable dt = new DataTable(); try { var requst = new GetClassByPropertyRequest() { Type = sProperty }; var response = alarmService.GetClassByProperty(requst); if (response.Data != null) { dt = response.Data; } } catch (Exception ex) { LogHelper.Error("ClientAlarmServer-GetClassByProperty-发生异常 " + ex.Message); } return(dt); }
public BasicResponse <DataTable> GetClassByProperty(GetClassByPropertyRequest alarmRequest) { var responsestr = HttpClientHelper.Post(Webapi + "/v1/alarm/getclassbyproperty?token=" + Token, JSONHelper.ToJSONString(alarmRequest)); return(JSONHelper.ParseJSONString <BasicResponse <DataTable> >(responsestr)); }
public BasicResponse <DataTable> GetClassByProperty(GetClassByPropertyRequest alarmRequest) { return(alarmService.GetClassByProperty(alarmRequest)); }