public AbnormalThresholdValueResponse GetAbnormalThresholdValueList() { var resp = new AbnormalThresholdValueResponse(); try { IEnumerable <Abnormal_ThresholdValueTable> source = _abnormalThresholdValueSettingDAL.FindAll();; if (HasNoSearchResult(source)) { resp.Message = "无记录!"; } else { resp.AbnormalThresholdValue = source; resp.Succeed = true; } } catch (Exception ex) { resp.Message = "搜索阈值列表信息发生错误!"; Log(ex); } return(resp); }
public AbnormalThresholdValueResponse ModifyAbnormalThresholdValue(AbnormalThresholdValueSettingRequest req) { var resp = new AbnormalThresholdValueResponse(); try { var abnormalThresholdValues = ModifyAbnormalThresholdValueByTypeId(req); abnormalThresholdValues.MaxLevelThresholdValue = req.MaxLevelThresholdValue; abnormalThresholdValues.MinLevelThresholdValue = req.MinLevelThresholdValue; SaveThresholdValueByPointsNumberId(abnormalThresholdValues); resp.Message = "保存成功!"; resp.Succeed = true; } catch (Exception ex) { resp.Message = "阈值保存失败!"; Log(ex); } return(resp); }