天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.3 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMAPP.FJC.Entity.Operation;
using QMAPP.FJC.DAL.Operation;
using QMAPP.KB.Entity;
using QMAPP.BLL;
using QMFrameWork.Data;
using QMAPP.FJC.BLL.Dict;
namespace QMAPP.FJC.BLL.Operation
{
public class InjectionCheckBLL : BaseBLL
{
public DataResult Insert(InjectionCheck model)
{
DataResult result = new DataResult();
result.IsSuccess = true;
try
{
int i = new InjectionCheckDAL().Insert(model);
if (i == 0)
{
result.IsSuccess = false;
}
return result;
}
catch (Exception ex)
{
throw ex;
}
}
#region 获取列表
/// <summary>
/// 获取列表
/// </summary>
/// <param name="condition">条件</param>
/// <param name="page">数据页</param>
/// <returns>数据页</returns>
public DataPage GetList(InjectionCheck condition, DataPage page)
{
try
{
page = new InjectionCheckDAL().GetList(condition, page);
List<InjectionCheck> list = page.Result as List<InjectionCheck>;
DictManageBLL dictProType = new DictManageBLL(DictKind.PRODUCTTYPE);
foreach (InjectionCheck o in list)
{
o.ISINJECT = (o.HAVEINJECTION > 0) ? true : false;
o.PRODUCTTYPE = dictProType.GetDictValue(o.PRODUCTTYPE);
}
page.Result = list;
return page;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
public DataResult Delete(string pid)
{
DataResult result = new DataResult();
result.IsSuccess = true;
try
{
int i = new InjectionCheckDAL().Delete(pid);
if (i == 0)
{
result.IsSuccess = false;
}
return result;
}
catch (Exception ex)
{
throw ex;
}
}
}
}