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

106 lines
3.2 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using ICSSoft.Frame.Data.Entity;
using ICSSoft.Frame.Data.DAL;
namespace ICSSoft.Frame.Data.BLL
{
public class ICSINVReceiptDetailBLL
{
public static DataTable SearchItemInfoList(string dsconn)
{
try
{
DataTable returndt = new DataTable();
returndt.Columns.Add("guid", typeof(string));
returndt.Columns.Add("存货编码", typeof(string));
returndt.Columns.Add("存货名称", typeof(string));
returndt.Columns.Add("规格型号", typeof(string));
List<FormICSINVENTORYUIModel> returndal = ICSINVReceiptDetailDAL.SearchItemInfoList(dsconn);
foreach (FormICSINVENTORYUIModel returntype in returndal)
{
DataRow dr = returndt.NewRow();
dr["guid"] = returntype.ID;
dr["存货编码"] = returntype.INVCODE;
dr["存货名称"] = returntype.INVNAME;
dr["规格型号"] = returntype.INVDESC;
returndt.Rows.Add(dr);
}
return returndt;
}
catch (Exception ex)
{
throw ex;
}
}
#region 新增和修改
public static void Add(FormICSINVReceiptDetailUIModel Info, string dsconn)
{
try
{
if (string.IsNullOrWhiteSpace(dsconn))
{
throw new Exception("数据库连接字符串错误");
}
List<FormICSINVReceiptDetailUIModel> InfoList = new List<FormICSINVReceiptDetailUIModel>() { Info };
ICSINVReceiptDetailDAL.Add(InfoList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 通过id查询
public static FormICSINVReceiptDetailUIModel SearchInfoByID(string dID, string dsconn)
{
try
{
List<FormICSINVReceiptDetailUIModel> returnlist = ICSINVReceiptDetailDAL.SearchInfoByID(dID, dsconn);
return returnlist[0];
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除
public static void deleteInfo(List<string> detailIDList, string dsconn)
{
try
{
ICSINVReceiptDetailDAL.deleteInfo(detailIDList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 产品明细代码是否存在
public static bool IsIncluding(string Rid, int Rline,string workpoint, string dsconn)
{
try
{
return ICSINVReceiptDetailDAL.IsIncluding(Rid, Rline,workpoint, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}