锐腾搅拌上料功能
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.

167 lines
4.5 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ICSSoft.Frame.Data.Entity;
using ICSSoft.Frame.Data.DAL;
using System.Data;
namespace ICSSoft.Frame.Data.BLL
{
public class ICSOPBLL
{
#region 新增和修改
public static void Add(FormICSOPUIModel tbInfo, string dsconn)
{
try
{
if (string.IsNullOrWhiteSpace(dsconn))
{
throw new Exception("数据库连接字符串错误");
}
List<FormICSOPUIModel> tbInfoList = new List<FormICSOPUIModel>() { tbInfo };
ICSOPDAL.Add(tbInfoList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 工序代码是否存在
public static bool IsIncluding(string opCODE, string dsconn)
{
try
{
return ICSOPDAL.IsIncluding(opCODE, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 查询工序信息
public static FormICSOPUIModel SearchOPInfo(string opcode, string dsconn)
{
try
{
List<FormICSOPUIModel> returnlist = ICSOPDAL.SearchOPInfo(opcode, dsconn);
return returnlist[0];
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除
public static void deleteInfo(List<string> codeList, string dsconn)
{
try
{
ICSOPDAL.deleteInfo(codeList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 判断是否在工序和资源的关系中
public static bool Including2RES(List<string> idList, string dsconn)
{
try
{
return ICSOPDAL.Including2RES(idList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 判断是否在途程和工序的关系中
public static bool IncludingROUTE2OP(List<string> idList, string dsconn)
{
try
{
return ICSOPDAL.IncludingROUTE2OP(idList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
public static List<ICSROUTE2OP> GetROUTE2OP(List<string> idList,string wp, string dsconn)
{
return ICSOPDAL.GetROUTE2OP(idList,wp, dsconn);
}
public static DataTable GetITEMROUTE2OP(List<string> idList, string wp, string dsconn)
{
return ICSOPDAL.GetITEMROUTE2OP(idList, wp, dsconn);
}
#endregion
#region 新增和修改List
public static void AddList(List<FormICSOPUIModel> tbInfoList, string dsconn)
{
try
{
if (string.IsNullOrWhiteSpace(dsconn))
{
throw new Exception("数据库连接字符串错误");
}
ICSOPDAL.Add(tbInfoList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 获取成本中心
public static DataTable SearchDataByEnumKey(string dsconn, string EnumKey)
{
try
{
return ICSOPDAL.SearchDataByEnumKey(dsconn, EnumKey);
}
catch (Exception ex)
{
throw ex;
}
}
public static DataTable SearchDataByEnumText(string dsconn, string EnumKey, string EnumText)
{
try
{
return ICSOPDAL.SearchDataByEnumText(dsconn, EnumKey, EnumText);
}
catch (Exception ex)
{
throw ex;
}
}
public static DataTable SearchDataByEnumValue(string dsconn, string EnumKey, string EnumValue)
{
try
{
return ICSOPDAL.SearchDataByEnumValue(dsconn, EnumKey, EnumValue);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}