Ejemplo n.º 1
0
        /// <summary>
        /// 根据种类获取测点
        /// </summary>
        /// <param name="alarmRequest"></param>
        /// <returns></returns>
        public BasicResponse <DataTable> GetPointByClass(GetPointByClassRequest alarmRequest)
        {
            var response = new BasicResponse <DataTable>();

            try
            {
                response.Data = _Repository.GetPointByClass(alarmRequest.sClass);
            }
            catch (Exception ex)
            {
                response.Code    = -100;
                response.Message = ex.Message;
                this.ThrowException("根据种类获取测点", ex);
            }

            return(response);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 根据种类获取测点
        /// </summary>
        /// <param name="sClass">种类</param>
        /// <returns></returns>
        public static DataTable GetPointByClass(string sClass)
        {
            DataTable dt = new DataTable();

            try
            {
                var request = new GetPointByClassRequest()
                {
                    sClass = sClass
                };
                var response = alarmService.GetPointByClass(request);
                if (response.Data != null)
                {
                    dt = response.Data;
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error("ClientAlarmServer-GetPointByClass-发生异常 " + ex.Message);
            }
            return(dt);
        }
        public BasicResponse <DataTable> GetPointByClass(GetPointByClassRequest alarmRequest)
        {
            var responsestr = HttpClientHelper.Post(Webapi + "v1/alarm/getpointbyclass?token=" + Token, JSONHelper.ToJSONString(alarmRequest));

            return(JSONHelper.ParseJSONString <BasicResponse <DataTable> >(responsestr));
        }
Ejemplo n.º 4
0
 public BasicResponse <DataTable> GetPointByClass(GetPointByClassRequest alarmRequest)
 {
     return(alarmService.GetPointByClass(alarmRequest));
 }