/// <summary>
        /// 删除图形
        /// </summary>
        /// <param name="graphicsbaseinfrequest"></param>
        /// <returns></returns>
        public BasicResponse DeleteGraphicsbaseinfForGraphId(DeleteGraphicsbaseinfForGraphIdRequest graphicsbaseinfrequest)
        {
            var response = new BasicResponse();

            if (string.IsNullOrWhiteSpace(graphicsbaseinfrequest.GraphId))
            {
                response.Code    = -100;
                response.Message = "参数错误!";
                return(response);
            }
            try
            {
                //删除图形
                _Repository.DeleteGraphicsbaseinfForGraphId(graphicsbaseinfrequest.GraphId);
                //删除当前图形的图元路线信息
                _GraphicsrouteinfRepository.DeleteGraphicsrouteinfForGraphId(graphicsbaseinfrequest.GraphId);
                //删除当前图形的测点绑定信息
                _GraphicspointsinfRepository.DeleteGraphicsPointsInfForGraphId(graphicsbaseinfrequest.GraphId);
            }
            catch (Exception ex)
            {
                response.Code    = -100;
                response.Message = ex.Message;
                this.ThrowException("DeleteGraphicsbaseinfForGraphId-删除图形", ex);
            }

            return(response);
        }
Example #2
0
        /// <summary>
        /// 删除图形绑定线路信息
        /// </summary>
        /// <param name="graphicsrouteinfrequest"></param>
        /// <returns></returns>
        public BasicResponse DeleteGraphicsrouteinfForGraphId(DeleteGraphicsrouteinfRequest graphicsrouteinfrequest)
        {
            var response = new BasicResponse();

            if (string.IsNullOrWhiteSpace(graphicsrouteinfrequest.GraphId))
            {
                response.Code    = -100;
                response.Message = "参数错误!";
                return(response);
            }
            try
            {
                _Repository.DeleteGraphicsrouteinfForGraphId(graphicsrouteinfrequest.GraphId);
            }
            catch (Exception ex)
            {
                response.Code    = -100;
                response.Message = ex.Message;
                this.ThrowException("DeleteGraphicsrouteinfForGraphId-删除图形绑定线路信息", ex);
            }
            return(response);
        }