예제 #1
0
        //
        public HttpResponseMessage GetEqib_Section(string STCode, string strUserName, string strPLevel, int iInclude)
        {
            string result = string.Empty;

            try
            {
                RuletblEQIB_Section     rule_point = new RuletblEQIB_Section();
                IList <tblEQIB_Section> list       = rule_point.GetSTCodeOrPCode(STCode, strUserName, strPLevel, iInclude);
                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")
            });
        }