예제 #1
0
        public BasicResponse <GraphicsrouteinfInfo> AddGraphicsrouteinf(GraphicsrouteinfAddRequest graphicsrouteinfrequest)
        {
            var graphicsrouteinfresponse = new BasicResponse <GraphicsrouteinfInfo>();

            if (graphicsrouteinfrequest.GraphicsrouteinfInfo == null)
            {
                graphicsrouteinfresponse.Code    = -100;
                graphicsrouteinfresponse.Message = "参数错误!";
                return(graphicsrouteinfresponse);
            }
            try
            {
                graphicsrouteinfrequest.GraphicsrouteinfInfo.ID = Basic.Framework.Common.IdHelper.CreateLongId().ToString();
                var _graphicsrouteinf      = ObjectConverter.Copy <GraphicsrouteinfInfo, GraphicsrouteinfModel>(graphicsrouteinfrequest.GraphicsrouteinfInfo);
                var resultgraphicsrouteinf = _Repository.AddGraphicsrouteinf(_graphicsrouteinf);
                graphicsrouteinfresponse.Data = ObjectConverter.Copy <GraphicsrouteinfModel, GraphicsrouteinfInfo>(resultgraphicsrouteinf);
            }
            catch (Exception ex)
            {
                graphicsrouteinfresponse.Code    = -100;
                graphicsrouteinfresponse.Message = ex.Message;
                this.ThrowException("AddGraphicsrouteinf-新增图形绑定路线", ex);
            }

            return(graphicsrouteinfresponse);
        }
예제 #2
0
 public BasicResponse <GraphicsrouteinfInfo> AddGraphicsrouteinf(GraphicsrouteinfAddRequest graphicsrouteinfrequest)
 {
     return(graphicsrouteinfService.AddGraphicsrouteinf(graphicsrouteinfrequest));
 }
예제 #3
0
        public BasicResponse <GraphicsrouteinfInfo> AddGraphicsrouteinf(GraphicsrouteinfAddRequest graphicsrouteinfrequest)
        {
            var responsestr = HttpClientHelper.Post(Webapi + "/v1/graphicsrouteinf/add?token=" + Token, JSONHelper.ToJSONString(graphicsrouteinfrequest));

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