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.
202 lines
6.3 KiB
202 lines
6.3 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using ICSSoft.Frame.Data.DAL;
|
|
using ICSSoft.Frame.Data.Entity;
|
|
using System.Data;
|
|
|
|
namespace ICSSoft.Frame.Data.BLL
|
|
{
|
|
public class ICSInvTransferDetailBLL
|
|
{
|
|
|
|
#region AddandEdit
|
|
public static void AddandEdit(FormICSInvTransferDetailUIModel ItemLot, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
if (string.IsNullOrWhiteSpace(dsconn))
|
|
{
|
|
throw new Exception("请输入......");
|
|
}
|
|
List<FormICSInvTransferDetailUIModel> ecgInfoList = new List<FormICSInvTransferDetailUIModel>() { ItemLot };
|
|
|
|
|
|
ICSInvTransferDetailDal.AddandEdit(ecgInfoList, dsconn);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region select
|
|
public static FormICSInvTransferDetailUIModel SearchInfoByID(string guid, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
List<FormICSInvTransferDetailUIModel> returnlist = ICSInvTransferDetailDal.SearchInfoByID(guid, dsconn);
|
|
return returnlist[0];
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region delete
|
|
public static void delete(List<String> guidList)
|
|
{
|
|
try
|
|
{
|
|
ICSInvTransferDetailDal.delete(guidList);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 查询物料信息
|
|
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 = ICSInvTransferDetailDal.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;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 查询工单信息
|
|
public static DataTable SearchMOInfoList(string dsconn)
|
|
{
|
|
try
|
|
{
|
|
DataTable returndt = new DataTable();
|
|
returndt.Columns.Add("guid", typeof(string));
|
|
returndt.Columns.Add("生产订单号", typeof(string));
|
|
returndt.Columns.Add("工单备注", typeof(string));
|
|
List<FormICSMOUIModel> returndal = ICSInvTransferDetailDal.SearchMOInfoList(dsconn);
|
|
foreach (FormICSMOUIModel returntype in returndal)
|
|
{
|
|
DataRow dr = returndt.NewRow();
|
|
dr["guid"] = returntype.ID;
|
|
dr["生产订单号"] = returntype.MOCODE;
|
|
dr["工单备注"] = returntype.MOMEMO;
|
|
returndt.Rows.Add(dr);
|
|
|
|
}
|
|
return returndt;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 查询库别信息
|
|
public static DataTable SearchStorageInfoList(string dsconn)
|
|
{
|
|
try
|
|
{
|
|
DataTable returndt = new DataTable();
|
|
returndt.Columns.Add("guid", typeof(string));
|
|
returndt.Columns.Add("库别代码", typeof(string));
|
|
returndt.Columns.Add("库别名称", typeof(string));
|
|
List<FormICSStorageUIModel> returndal = ICSInvTransferDetailDal.SearchStorageInfoList(dsconn);
|
|
foreach (FormICSStorageUIModel returntype in returndal)
|
|
{
|
|
DataRow dr = returndt.NewRow();
|
|
dr["guid"] = returntype.Serial;
|
|
dr["库别代码"] = returntype.StorageCode;
|
|
dr["库别名称"] = returntype.StorageName;
|
|
returndt.Rows.Add(dr);
|
|
|
|
}
|
|
return returndt;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 查询库位信息
|
|
public static DataTable SearchStackInfoList(string storageid, string dsconn)
|
|
{
|
|
try
|
|
{
|
|
DataTable returndt = new DataTable();
|
|
returndt.Columns.Add("guid", typeof(string));
|
|
returndt.Columns.Add("库位代码", typeof(string));
|
|
returndt.Columns.Add("库位名称", typeof(string));
|
|
List<FormICSStackUIModel> returndal = ICSInvTransferDetailDal.SearchStackInfoList(storageid,dsconn);
|
|
foreach (FormICSStackUIModel returntype in returndal)
|
|
{
|
|
DataRow dr = returndt.NewRow();
|
|
dr["guid"] = returntype.Serial;
|
|
dr["库位代码"] = returntype.StackCode;
|
|
dr["库位名称"] = returntype.StackName;
|
|
returndt.Rows.Add(dr);
|
|
|
|
}
|
|
return returndt;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 根据库别代码查询库别id
|
|
public static DataTable SelectStorageID(string storagecode)
|
|
{
|
|
|
|
{
|
|
try
|
|
{
|
|
return ICSInvTransferDetailDal.SelectStorageID(storagecode);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
}
|