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

166 lines
4.3 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 ICSECGBLL
{
public static void Add(FormICSECGUIModel Info, string dsconn)
{
try
{
if (string.IsNullOrWhiteSpace(dsconn))
{
throw new Exception("请输入......");
}
List<FormICSECGUIModel> ecgInfoList = new List<FormICSECGUIModel>() { Info };
ICSECGDAL.AddAndEdit(ecgInfoList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#region select
public static FormICSECGUIModel SearchEcgInfoByCode(string id, string dsconn)
{
try
{
List<FormICSECGUIModel> returnlist = ICSECGDAL.SearchEcgInfoById(id, dsconn);
return returnlist[0];
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
public static DataTable SearchPOInfoList(string str, string dsconn)
{
try
{
DataTable returndt = new DataTable();
returndt.Columns.Add("工序代码", typeof(string));
returndt.Columns.Add("工序", typeof(string));
List<FormICSOPUIModel> returndal = ICSECGDAL.SearchOPInfoList(str, dsconn);
foreach (FormICSOPUIModel returntype in returndal)
{
DataRow dr = returndt.NewRow();
dr["工序代码"] = returntype.OPCODE;
dr["工序"] = returntype.OPDESC;
returndt.Rows.Add(dr);
}
return returndt;
}
catch (Exception ex)
{
throw ex;
}
}
public static DataTable SearchRESInfoList(string str, string dsconn)
{
try
{
DataTable returndt = new DataTable();
returndt.Columns.Add("资源代码", typeof(string));
returndt.Columns.Add("资源描述", typeof(string));
List<FormICSRESUIModel> returndal = ICSECGDAL.SearchRESInfoList(str, dsconn);
foreach (FormICSRESUIModel returntype in returndal)
{
DataRow dr = returndt.NewRow();
dr["资源代码"] = returntype.RESCODE;
dr["资源描述"] = returntype.RESDESC;
returndt.Rows.Add(dr);
}
return returndt;
}
catch (Exception ex)
{
throw ex;
}
}
#region delete
public static void delete(List<String> guidList, List<String> codeList)
{
ICSECGDAL.delete(guidList,codeList);
}
#endregion
// public static DataTable SelectItemId(string str,string wp)
// {
// try
// {
// return ICSMODELOP2CKGROUPDAL.SelectItemId(str,wp);
// }
// catch (Exception ex)
// {
// throw ex;
// }
// }
// public static DataTable SelectOpId(string str, string wp)
// {
// try
// {
// return ICSMODELOP2CKGROUPDAL.SelectOpId(str, wp);
// }
// catch (Exception ex)
// {
// throw ex;
// }
// }
// public static DataTable SelectCkgroupId(string str, string wp)
// {
// try
// {
// return ICSMODELOP2CKGROUPDAL.SelectCkgroupId(str,wp);
// }
// catch (Exception ex)
// {
// throw ex;
// }
//}
// public static bool IsIncludingItemOP(string ITEMCODE,string OPCODE, string dsconn)
// {
// try
// {
// return ICSMODELOP2CKGROUPDAL.IsIncludingItemOP(ITEMCODE, OPCODE, dsconn);
// }
// catch (Exception ex)
// {
// throw ex;
// }
// }
}
}