using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using CY.IDAL;
using CY.Model;
using CY.Infrastructure.Configuration;
using CY.Infrastructure.Common;
using CY.BLL;
using System.Transactions;
using CY.Infrastructure.Query;
namespace CY.BLL.OA
{
public class OA_InventoryBLL
{
OA_ProcurementBLL _OA_ProcurementBLL = null;
IOA_InventoryDAL inventoryDAL = null;
OA_Inventory Inventory = null;
OA_OutOfStorage outOfStorage = null;
public OA_InventoryBLL()
{
Inventory = new OA_Inventory();
outOfStorage = new OA_OutOfStorage();
_OA_ProcurementBLL = new OA_ProcurementBLL();
inventoryDAL = AbstractFactory.Factory.GetDALByInterfaceName(AbstractFactory.DALInterface.IOA_InventoryDAL) as IOA_InventoryDAL;
}
///
/// 判断货位中是否已经存在此产品
///
///
///
public OA_Inventory IfHasModel(OA_Inventory model)
{
return inventoryDAL.IfHasModel(model);
}
///
/// 更新产品入库信息
///
///
///
public bool UpdateModel(Model.OA_Inventory model)
{
return inventoryDAL.UpdateModel(model);
}
///
/// 插入产品入库信息
///
///
///
public bool InsertModel(Model.OA_Inventory model)
{
return inventoryDAL.InserModel(model);
}
///
/// 取得所有的库存信息
///
///
///
///
///
public IEnumerable SelectModelList(Pagination pa, Guid FirmId, string PaperWeightId, string WarehouseId, string SpecificationId, string BrandId, string GoodsTypeId, string GoodsId, string Operator, DateTime? beginTime, DateTime? endTime)
{
return inventoryDAL.SelectModelList(pa, FirmId, PaperWeightId, WarehouseId, SpecificationId, BrandId, GoodsTypeId, GoodsId, Operator, beginTime, endTime);
}
///
/// 仓库管理
///
///
///
///
///
public decimal SelectModelListTotalPrice(Pagination pa, Guid FirmId, string PaperWeightId, string WarehouseId, string SpecificationId, string BrandId, string GoodsTypeId, string GoodsId, string Operator, DateTime? beginTime, DateTime? endTime)
{
return inventoryDAL.SelectModelListTotalPrice(pa, FirmId, PaperWeightId, WarehouseId, SpecificationId, BrandId, GoodsTypeId, GoodsId, Operator, beginTime, endTime);
}
///
/// 获取库存货品的详细信息
///
///
///
///
///
///
///
///
///
///
public IEnumerable SelecetModelDetailInfoList(Pagination pa, Guid FirmId, string WarehouseName, string GoodsName, string CommodityName, string BrandName, string SpecificationName)
{
return inventoryDAL.SelecetModelDetailInfoList(pa, FirmId, WarehouseName, GoodsName, CommodityName, BrandName, SpecificationName);
}
///
/// 获取单个库存信息
///
///
///
public OA_Inventory GetModelByKeyid(int? Keyid)
{
return inventoryDAL.GetModelByKeyid(Keyid);
}
///
/// 库存打印列表
///
///
///
///
public IEnumerable SelectModelListByKeyid(Guid FirmId, string Keyid)
{
return inventoryDAL.SelectModelListByKeyid(FirmId, Keyid);
}
///
/// 库存打印列表
///
///
///
///
public decimal SelectModelListByKeyidTotalPrice(Guid FirmId, string Keyid)
{
return inventoryDAL.SelectModelListByKeyidTotalPrice(FirmId, Keyid);
}
}
}