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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ICSSoft.Frame.Data.Entity;
using ICSSoft.Frame.Data.DAL;
namespace ICSSoft.Frame.Data.BLL
{
public class ICSShifTypeBLL
{
#region 新增和修改
public static void Add(FormICSShifTypeUIModel typeInfo, string dsconn)
{
try
{
if (string.IsNullOrWhiteSpace(dsconn))
{
throw new Exception("数据库连接字符串错误");
}
List<FormICSShifTypeUIModel> typeInfoList = new List<FormICSShifTypeUIModel>() { typeInfo };
ICSShifTypeDAL.Add(typeInfoList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 通过班制id查询
public static FormICSShifTypeUIModel SearchTypeInfoByCode(string typeID, string dsconn)
{
try
{
List<FormICSShifTypeUIModel> returnlist = ICSShifTypeDAL.SearchTypeInfoByCode(typeID, dsconn);
return returnlist[0];
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 班制代码是否存在
public static bool IsIncluding(string SHIFTTYPECODE, string dsconn)
{
try
{
return ICSShifTypeDAL.IsIncluding(SHIFTTYPECODE, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 判断是否在班次中
public static bool IncludingShift(List<string> idList,string dsconn)
{
try
{
return ICSShifTypeDAL.IncludingShift(idList,dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除
public static void deleteInfo(List<string> idList, string dsconn)
{
try
{
ICSShifTypeDAL.deleteInfo(idList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 查询最大的班制代码
public static string SearchMaxCode(string dsconn)
{
return ICSShifTypeDAL.SearchMaxCode(dsconn);
}
#endregion
}
}