using System;
|
using System.Collections.Generic;
|
using System.Text;
|
using System.Data;
|
|
namespace BLL
|
{
|
public class ClsIF_StockPlace_View
|
{
|
/// <summary>
|
/// 根据过滤条件返回仓位列表
|
/// </summary>
|
/// <param name="sWhere">过滤条件</param>
|
/// <param name="sErr">错误信息</param>
|
/// <returns></returns>
|
public DataSet GetList(string sWhere, ref string sErr)
|
{
|
try
|
{
|
DAL.ClsIF_StockPlace_View dal = new DAL.ClsIF_StockPlace_View();
|
return dal.GetList(sWhere);
|
}
|
catch (Exception e)
|
{
|
sErr = sErr + "," + e.Message;
|
return null;
|
}
|
}
|
|
/// <summary>
|
/// 根据内码返回仓位信息
|
/// </summary>
|
/// <param name="sWhere">内码</param>
|
/// <param name="sErr">错误信息</param>
|
/// <returns></returns>
|
public Model.ClsGy_StockPlace_Model GetInfoByID(long sWhere, ref string sErr)
|
{
|
try
|
{
|
DAL.ClsIF_StockPlace_View dal = new DAL.ClsIF_StockPlace_View();
|
if (dal.GetInfoByID(sWhere))
|
{
|
return dal.omodel;
|
}
|
else
|
{
|
return null;
|
}
|
}
|
catch (Exception e)
|
{
|
sErr = sErr + "," + e.Message;
|
return null;
|
}
|
}
|
|
/// <summary>
|
/// 根据内码返回仓位信息(并判断是否在对应的仓库里)
|
/// </summary>
|
/// <param name="HSPID">仓位内码</param>
|
/// <param name="HWHID">仓库内码</param>
|
/// <param name="sErr">错误信息</param>
|
/// <returns></returns>
|
public Model.ClsGy_StockPlace_Model GetInfoByID(long HSPID,long HWHID, ref string sErr)
|
{
|
try
|
{
|
DAL.ClsIF_StockPlace_View dal = new DAL.ClsIF_StockPlace_View();
|
if (dal.GetInfoByID(HSPID, HWHID))
|
{
|
return dal.omodel;
|
}
|
else
|
{
|
return null;
|
}
|
}
|
catch (Exception e)
|
{
|
sErr = sErr + "," + e.Message;
|
return null;
|
}
|
}
|
|
|
/// <summary>
|
/// 根据内码返回仓位信息(并判断是否在对应的仓库里)
|
/// </summary>
|
/// <param name="HSPID">仓位内码</param>
|
/// <param name="HWHID">仓库内码</param>
|
/// <param name="sErr">错误信息</param>
|
/// <returns></returns>
|
public DataSet GetInfoByID(long HSPID, long HWHID, long HORGID)
|
{
|
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
|
DataSet DS;
|
try
|
{
|
DS = oCn.RunProcReturn("Select * from h_v_IF_StockPlace Where HItemID=" + HSPID.ToString() + " and HWHID=" + HWHID.ToString(), "h_v_IF_StockPlace", ref DBUtility.ClsPub.sExeReturnInfo);
|
if (DS.Tables[0].Rows.Count == 0)
|
return null;
|
else
|
{
|
return DS;
|
}
|
}
|
catch (Exception e)
|
{
|
throw (e);
|
}
|
}
|
|
|
}
|
}
|