Ejemplo n.º 1
0
        public BasicResponse <GraphicsrouteinfInfo> UpdateGraphicsrouteinf(GraphicsrouteinfUpdateRequest graphicsrouteinfrequest)
        {
            var graphicsrouteinfresponse = new BasicResponse <GraphicsrouteinfInfo>();

            if (graphicsrouteinfrequest.GraphicsrouteinfInfo == null)
            {
                graphicsrouteinfresponse.Code    = -100;
                graphicsrouteinfresponse.Message = "参数错误!";
                return(graphicsrouteinfresponse);
            }
            var graphicsrouteinfModel = _Repository.GetGraphicsrouteinfById(graphicsrouteinfrequest.GraphicsrouteinfInfo.ID);

            if (graphicsrouteinfModel == null)
            {
                graphicsrouteinfresponse.Code    = -100;
                graphicsrouteinfresponse.Message = "对象不存在!";
                return(graphicsrouteinfresponse);
            }

            try
            {
                var _graphicsrouteinf = ObjectConverter.Copy <GraphicsrouteinfInfo, GraphicsrouteinfModel>(graphicsrouteinfrequest.GraphicsrouteinfInfo);
                _Repository.UpdateGraphicsrouteinf(_graphicsrouteinf);
                graphicsrouteinfresponse.Data = ObjectConverter.Copy <GraphicsrouteinfModel, GraphicsrouteinfInfo>(_graphicsrouteinf);
            }
            catch (Exception ex)
            {
                graphicsrouteinfresponse.Code    = -100;
                graphicsrouteinfresponse.Message = ex.Message;
                this.ThrowException("UpdateGraphicsrouteinf-修改图形绑定线路信息", ex);
            }

            return(graphicsrouteinfresponse);
        }
Ejemplo n.º 2
0
 public BasicResponse <GraphicsrouteinfInfo> UpdateGraphicsrouteinf(GraphicsrouteinfUpdateRequest graphicsrouteinfrequest)
 {
     return(graphicsrouteinfService.UpdateGraphicsrouteinf(graphicsrouteinfrequest));
 }
Ejemplo n.º 3
0
        public BasicResponse <GraphicsrouteinfInfo> UpdateGraphicsrouteinf(GraphicsrouteinfUpdateRequest graphicsrouteinfrequest)
        {
            var responsestr = HttpClientHelper.Post(Webapi + "/v1/graphicsrouteinf/update?token=" + Token, JSONHelper.ToJSONString(graphicsrouteinfrequest));

            return(JSONHelper.ParseJSONString <BasicResponse <GraphicsrouteinfInfo> >(responsestr));
        }