Exemple #1
0
        //
        public HttpResponseMessage GetEqib_Section_V2(string STCode)
        {
            string result = string.Empty;

            try
            {
                RuletblEQIB_Section     rule_point = new RuletblEQIB_Section();
                IList <tblEQIB_Section> list       = rule_point.GetDataAndSelfBySTCode(STCode);
                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")
            });
        }
Exemple #2
0
        public HttpResponseMessage GetEqib_Section_GetByYearAndLevel(string STCode, int Year, short Level)
        {
            string result = string.Empty;

            try
            {
                RuletblEQIB_Section rule_point = new RuletblEQIB_Section();
                DataTable           list       = rule_point.GetByYearAndLevel(STCode, Year, Level);
                if (list != null && list.Rows.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")
            });
        }