예제 #1
0
        /// <summary>
        /// 更新通道标注状态
        /// </summary>
        /// <param name="channelUpdateLocation">通道标注状态</param>
        /// <returns>更新结果</returns>
        public IStatusCodeActionResult UpdateLocation([FromBody] DensityChannelUpdateLocation channelUpdateLocation)
        {
            DensityChannel channel = _context.Channels.SingleOrDefault(d => d.ChannelId == channelUpdateLocation.ChannelId);

            if (channel == null)
            {
                return(new NotFoundResult());
            }

            channel.Location = channelUpdateLocation.Location;
            channel.Marked   = true;
            _context.Channels.Update(channel);
            _context.SaveChanges();
            return(new OkResult());
        }
예제 #2
0
 public IActionResult UpdateLocation([FromBody] DensityChannelUpdateLocation channelUpdateLocation)
 {
     return(_manager.UpdateLocation(channelUpdateLocation));
 }