using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WMS.Model.Stock;
using WMS.Model.CK;
using System.Data;
using WMS.IData;
using WMS.Common;
namespace WMS.Business.Stock
{
public class BussMIPackStock : IBussFactory
{
///
/// 增加一条记录
///
///
///
public string Add(MIPackStockModel model)
{
DataProvider.Instance.MIPackStock.Add(model);
Transaction = DataProvider.Instance.TranOracle;
logList.Add(DataProvider.Instance.logData);
TaCmtOrRak();
return this.ErrText;
}
///
/// 增加记录集合
///
///
///
public string AddList(List MIPackStocklist)
{
Transaction = DataProvider.Instance.TranOracle;
foreach (MIPackStockModel MIPackStockmodel in MIPackStocklist)
{
DataProvider.Instance.MIPackStock.Add(MIPackStockmodel);
logList.Add(DataProvider.Instance.logData);
}
TaCmtOrRak();
return this.ErrText;
}
///
/// 修改一条记录
///
///
///
public string Update(MIPackStockModel model)
{
DataProvider.Instance.MIPackStock.Update(model);
Transaction = DataProvider.Instance.TranOracle;
logList.Add(DataProvider.Instance.logData);
TaCmtOrRak();
return this.ErrText;
}
///
/// 删除一条记录
///
///
///
public string Delete(MIPackStockModel model)
{
DataProvider.Instance.MIPackStock.Delete(model);
Transaction = DataProvider.Instance.TranOracle;
logList.Add(DataProvider.Instance.logData);
TaCmtOrRak();
return this.ErrText;
}
///
/// 删除记录集合
///
///
///
public string DeleteList(List modellist)
{
Transaction = DataProvider.Instance.TranOracle;
foreach (MIPackStockModel MIPackStockmodel in modellist)
{
DataProvider.Instance.MIPackStock.Delete(MIPackStockmodel);
logList.Add(DataProvider.Instance.logData);
}
TaCmtOrRak();
return this.ErrText;
}
///
/// 获取集合
///
///
///
public List GetList(MIPackStockModel model)
{
DataTable table = DataProvider.Instance.MIPackStock.GetList(model);
List CountingModelList = ConvertHelper.ConvertToList(table);
if (DataLogErrWrite(table, "获取包装库存单"))
{
return CountingModelList;
}
return null;
}
///
/// 获取商品重量
///
///
public string GetWeight(string EXPRESSNO)
{
return DataProvider.Instance.MIPackStock.GetWeight(EXPRESSNO);
}
}
}