// public HttpResponseMessage GetEqiw_DT_Section_V2(string STCode, string RCode, short Level, int include, int year) { string result = string.Empty; try { RuletblEQIW_DT_Section rule_point = new RuletblEQIW_DT_Section(); IList <tblEQIW_DT_Section> list = rule_point.GetRSCode(STCode, RCode, Level, include, year); if (list != null && list.Count > 0) { result = rule.JsonStr("ok", "", list); } else { result = rule.JsonStr("nodata", "没有测点数据", ""); } } catch (Exception e) { result = rule.JsonStr("error", e.Message, ""); } return(new HttpResponseMessage { Content = new StringContent(result, System.Text.Encoding.UTF8, "application/json") }); }
// public HttpResponseMessage GetEqiw_DT_RNameandRSName(string year, string stcode, string Level) { string result = string.Empty; try { if (string.IsNullOrEmpty(year)) { result = rule.JsonStr("error", "缺少结束日期", ""); } else if (string.IsNullOrEmpty(stcode)) { result = rule.JsonStr("error", "缺少城市代码", ""); } else if (string.IsNullOrEmpty(Level)) { result = rule.JsonStr("error", "缺少断面级别", ""); } else { RuletblEQIW_DT_Section rule_section = new RuletblEQIW_DT_Section(); IList <tblEQIW_DT_Section> list = rule_section.GetRSCodeandRCode(stcode, short.Parse(Level), year); if (list != null && list.Count > 0) { result = rule.JsonStr("ok", "", list); } else { result = rule.JsonStr("nodata", "没有断面数据", ""); } } } catch (Exception e) { result = rule.JsonStr("error", e.Message, ""); } return(new HttpResponseMessage { Content = new StringContent(result, System.Text.Encoding.UTF8, "application/json") }); }