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.
138 lines
3.5 KiB
138 lines
3.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 ICSMODELOP2CKGROUPBLL
|
|
{
|
|
public static void Add(FormICSMODELOP2CKGROUPUIModel Info, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
if (string.IsNullOrWhiteSpace(dsconn))
|
|
{
|
|
throw new Exception("请输入......");
|
|
}
|
|
List<FormICSMODELOP2CKGROUPUIModel> ckgroupInfoList = new List<FormICSMODELOP2CKGROUPUIModel>() { Info };
|
|
|
|
|
|
ICSMODELOP2CKGROUPDAL.AddAndEdit(ckgroupInfoList, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
|
|
#region select
|
|
public static FormICSMODELOP2CKGROUPUIModel SearchCkgroupInfoByCode(string ITEMCODE, string OPCODE, string CKGROUP, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
List<FormICSMODELOP2CKGROUPUIModel> returnlist = ICSMODELOP2CKGROUPDAL.SearchCkgroupInfoByCode(ITEMCODE,OPCODE,CKGROUP,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 = ICSMODELOP2CKGROUPDAL.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;
|
|
}
|
|
|
|
}
|
|
|
|
#region delete
|
|
|
|
public static void delete(List<String> codeList)
|
|
{
|
|
ICSMODELOP2CKGROUPDAL.delete(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;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|