60 lines
1.6 KiB
C#
60 lines
1.6 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Web;
|
|||
|
using System.Web.Http;
|
|||
|
using BLL;
|
|||
|
|
|||
|
namespace WebAPI.Controllers
|
|||
|
{
|
|||
|
public class IsoInfoController : ApiController
|
|||
|
{
|
|||
|
#region 保存管线信息
|
|||
|
/// <summary>
|
|||
|
/// 保存管线信息
|
|||
|
/// </summary>
|
|||
|
/// <param name="addItem">管线项</param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public Model.ResponeData PostSaveIsoInfo([FromBody] Model.IsoInfoItem addItem)
|
|||
|
{
|
|||
|
var responeData = new Model.ResponeData();
|
|||
|
try
|
|||
|
{
|
|||
|
BLL.APIIsoInfoServicecs.SaveIsoInfo(addItem);
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
responeData.code = 0;
|
|||
|
responeData.message = ex.Message;
|
|||
|
}
|
|||
|
|
|||
|
return responeData;
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region 批量保存管线信息
|
|||
|
/// <summary>
|
|||
|
/// 批量保存管线信息
|
|||
|
/// </summary>
|
|||
|
/// <param name="addItems">管线项</param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public Model.ResponeData PostSaveIsoInfoList([FromBody] List<Model.IsoInfoItem> addItems)
|
|||
|
{
|
|||
|
var responeData = new Model.ResponeData();
|
|||
|
try
|
|||
|
{
|
|||
|
BLL.APIIsoInfoServicecs.SaveBatchIsoInfo(addItems);
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
responeData.code = 0;
|
|||
|
responeData.message = ex.Message;
|
|||
|
}
|
|||
|
|
|||
|
return responeData;
|
|||
|
}
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|