| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("Insert")] |
| | | public ResponseResult Add([FromBody] MesDbck data) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.Insert(data); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | ///// <summary> |
| | | ///// 添加 |
| | | ///// </summary> |
| | | ///// <returns></returns> |
| | | //[HttpPost("Insert")] |
| | | //public ResponseResult Add([FromBody] MesDbck data) |
| | | //{ |
| | | // try |
| | | // { |
| | | // dynamic resultInfos = new ExpandoObject(); |
| | | // resultInfos.tbBillList = m.Insert(data); |
| | | // return new ResponseResult |
| | | // { |
| | | // status = 0, |
| | | // message = "OK", |
| | | // data = resultInfos |
| | | // }; |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // return ResponseResult.ResponseError(ex); |
| | | // } |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 添加返回自增 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("InsertReturnIdentity")] |
| | | public ResponseResult InsertReturnIdentity([FromBody] MesDbck data) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.InsertReturnIdentity(data); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | ///// <summary> |
| | | ///// 添加返回自增 |
| | | ///// </summary> |
| | | ///// <returns></returns> |
| | | //[HttpPost("InsertReturnIdentity")] |
| | | //public ResponseResult InsertReturnIdentity([FromBody] MesDbck data) |
| | | //{ |
| | | // try |
| | | // { |
| | | // dynamic resultInfos = new ExpandoObject(); |
| | | // resultInfos.tbBillList = m.InsertReturnIdentity(data); |
| | | // return new ResponseResult |
| | | // { |
| | | // status = 0, |
| | | // message = "OK", |
| | | // data = resultInfos |
| | | // }; |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // return ResponseResult.ResponseError(ex); |
| | | // } |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 修改 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("Update")] |
| | | public ResponseResult Update([FromBody] MesDbck data) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.Update(data); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | ///// <summary> |
| | | ///// 修改 |
| | | ///// </summary> |
| | | ///// <returns></returns> |
| | | //[HttpPost("Update")] |
| | | //public ResponseResult Update([FromBody] MesDbck data) |
| | | //{ |
| | | // try |
| | | // { |
| | | // dynamic resultInfos = new ExpandoObject(); |
| | | // resultInfos.tbBillList = m.Update(data); |
| | | // return new ResponseResult |
| | | // { |
| | | // status = 0, |
| | | // message = "OK", |
| | | // data = resultInfos |
| | | // }; |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // return ResponseResult.ResponseError(ex); |
| | | // } |
| | | //} |
| | | } |