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.
159 lines
4.6 KiB
159 lines
4.6 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using ICSSoft.Frame.Data.Entity;
|
|
using ICSSoft.Frame.Data.DAL;
|
|
using ICSSoft.Base.Config.AppConfig;
|
|
using System.Data;
|
|
|
|
|
|
namespace ICSSoft.Frame.Data.BLL
|
|
{
|
|
public class ICSSEGBLL
|
|
{
|
|
//public static DataTable SearchShifTypeInfoList(string dsconn)
|
|
//{
|
|
// try
|
|
// {
|
|
// DataTable returndt = new DataTable();
|
|
// returndt.Columns.Add("guid",typeof(string));
|
|
// returndt.Columns.Add("班制代码", typeof(string));
|
|
// returndt.Columns.Add("班制描述", typeof(string));
|
|
// List<FormICSShifTypeUIModel> returndal = ICSSEGDAL.SearchShifTypeInfoList(dsconn);
|
|
// foreach (FormICSShifTypeUIModel returntype in returndal)
|
|
// {
|
|
// DataRow dr = returndt.NewRow();
|
|
// dr["guid"] = returntype.ID;
|
|
// dr["班制代码"] = returntype.SHIFTTYPECODE;
|
|
// dr["班制描述"] = returntype.SHIFTTYPEDESC;
|
|
// returndt.Rows.Add(dr);
|
|
|
|
// }
|
|
// return returndt;
|
|
// }
|
|
// catch (Exception ex)
|
|
// {
|
|
// throw ex;
|
|
// }
|
|
|
|
//}
|
|
public static DataTable SearchFacInfoList(string dsconn)
|
|
{
|
|
try
|
|
{
|
|
DataTable returndt = new DataTable();
|
|
returndt.Columns.Add("guid", typeof(string));
|
|
returndt.Columns.Add("工厂代码", typeof(string));
|
|
returndt.Columns.Add("工厂描述", typeof(string));
|
|
List<FormICSFactoryUIModel> returndal = ICSSEGDAL.SearchFacInfoList(dsconn);
|
|
foreach (FormICSFactoryUIModel returntype in returndal)
|
|
{
|
|
DataRow dr = returndt.NewRow();
|
|
dr["guid"] = returntype.ID;
|
|
dr["工厂代码"] = returntype.FACCODE;
|
|
dr["工厂描述"] = returntype.FACDESC;
|
|
returndt.Rows.Add(dr);
|
|
|
|
}
|
|
return returndt;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
|
|
#region 新增和修改
|
|
public static void Add(FormICSSEGUIModel segInfo, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
if (string.IsNullOrWhiteSpace(dsconn))
|
|
{
|
|
throw new Exception("数据库连接字符串错误");
|
|
}
|
|
List<FormICSSEGUIModel> SEGInfoList = new List<FormICSSEGUIModel>() { segInfo };
|
|
ICSSEGDAL.Add(SEGInfoList, dsconn);
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
#region 通过工厂代码查询
|
|
public static FormICSSEGUIModel SearchSEGInfoByCode(string segCODE, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
List<FormICSSEGUIModel> returnlist = ICSSEGDAL.SearchSEGInfoByCode(segCODE, dsconn);
|
|
return returnlist[0];
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
#region 判断是否在产线中
|
|
public static bool IncludingSS(List<string> idList, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
return ICSSEGDAL.IncludingSS(idList, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
#region 删除
|
|
public static void deleteInfo(List<string> codeList, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
ICSSEGDAL.deleteInfo(codeList, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
|
|
}
|
|
#endregion
|
|
#region 车间代码是否存在
|
|
public static bool IsIncluding(string segCODE, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
return ICSSEGDAL.IsIncluding(segCODE, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
#region 判断是否和工作中心关联
|
|
public static bool IncludingEquipment(List<string> idList, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
return ICSSEGDAL.IncludingEquipment(idList, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
}
|
|
}
|