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.
160 lines
4.5 KiB
160 lines
4.5 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 ICSINVReceiptBLL
|
|
{
|
|
public static DataTable SearchStorageInfoList(string dsconn)
|
|
{
|
|
try
|
|
{
|
|
DataTable returndt = new DataTable();
|
|
returndt.Columns.Add("Serial", typeof(string));
|
|
returndt.Columns.Add("库别代码", typeof(string));
|
|
returndt.Columns.Add("库别名称", typeof(string));
|
|
List<FormICSStorageUIModel> returndal = ICSINVReceiptDAL.SearchStorageInfoList(dsconn);
|
|
foreach (FormICSStorageUIModel returns in returndal)
|
|
{
|
|
DataRow dr = returndt.NewRow();
|
|
dr["Serial"] = returns.Serial;
|
|
dr["库别代码"] = returns.StorageCode;
|
|
dr["库别名称"] = returns.StorageName;
|
|
returndt.Rows.Add(dr);
|
|
|
|
}
|
|
return returndt;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
public static DataTable SearchVendorInfoList(string dsconn)
|
|
{
|
|
try
|
|
{
|
|
DataTable returndt = new DataTable();
|
|
returndt.Columns.Add("ID", typeof(string));
|
|
returndt.Columns.Add("厂商代码", typeof(string));
|
|
returndt.Columns.Add("厂商名称", typeof(string));
|
|
List<FormICSVendorUIModel> returndal = ICSINVReceiptDAL.SearchVendorInfoList(dsconn);
|
|
foreach (FormICSVendorUIModel returnv in returndal)
|
|
{
|
|
DataRow dr = returndt.NewRow();
|
|
dr["ID"] = returnv.ID;
|
|
dr["厂商代码"] = returnv.VendorCode;
|
|
dr["厂商名称"] = returnv.VendorName;
|
|
returndt.Rows.Add(dr);
|
|
|
|
}
|
|
return returndt;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#region 新增和修改
|
|
public static void Add(FormICSINVReceiptUIModel Info, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
if (string.IsNullOrWhiteSpace(dsconn))
|
|
{
|
|
throw new Exception("数据库连接字符串错误");
|
|
}
|
|
List<FormICSINVReceiptUIModel> InfoList = new List<FormICSINVReceiptUIModel>() { Info };
|
|
ICSINVReceiptDAL.Add(InfoList, dsconn);
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 通过入库guid查询
|
|
public static FormICSINVReceiptUIModel SearchInfoByID(string Rguid, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
List<FormICSINVReceiptUIModel> returnlist = ICSINVReceiptDAL.SearchInfoByID(Rguid, dsconn);
|
|
return returnlist[0];
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
#region 删除
|
|
public static void deleteInfo(List<string> RIDList, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
ICSINVReceiptDAL.deleteInfo(RIDList, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
|
|
}
|
|
#endregion
|
|
#region 入库代码是否存在
|
|
public static bool IsIncluding(string noCODE,string workpoint, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
return ICSINVReceiptDAL.IsIncluding(noCODE,workpoint, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
public static bool IsIncludingDetail(List<string> RIDList, string dsconn)
|
|
{
|
|
|
|
try
|
|
{
|
|
return ICSINVReceiptDAL.IsIncludingDetail(RIDList, dsconn);
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
#region 子件资料信息
|
|
public static DataTable GetDetail(string Sql)
|
|
{
|
|
try
|
|
{
|
|
return ICSINVReceiptDAL.GetDetail(Sql);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
}
|
|
}
|