| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Autofac.Core; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Newtonsoft.Json; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_ISystemServices; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_SystemServices; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.System |
| | | { |
| | |
| | | public Dt_StationinfoController(IDt_StationinfoService service) : base(service) |
| | | { |
| | | } |
| | | [HttpPost, Route("SetStationEnable"), AllowAnonymous] |
| | | public WebResponseContent SetStationEnable([FromBody] object parm) |
| | | { |
| | | return Service.SetStationEnable(parm); |
| | | } |
| | | |
| | | //public WebResponseContent SetStationEnable(object parm) |
| | | //{ |
| | | // WebResponseContent content = new WebResponseContent(); |
| | | // try |
| | | // { |
| | | // var data = JsonConvert.DeserializeObject<Parm>(parm.ToString()); |
| | | // var res = BaseDal.QueryFirst(x => data.data.Contains(x.id.ToString())); |
| | | // res.Enable = data.type.ObjToBool(); |
| | | // var isTrue = BaseDal.UpdateData(res); |
| | | // if (isTrue) |
| | | // { |
| | | // content.OK("ç¼åæ¶ç¶ææ´æ°æå"); |
| | | // } |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // content.Error(ex.Message); |
| | | // } |
| | | // return content; |
| | | //} |
| | | |
| | | } |
| | | } |