using System; using System.Collections.Generic; using System.Text; using System.Data; namespace BLL { public class ClsIF_StockPlace_View { /// /// 根据过滤条件返回仓位列表 /// /// 过滤条件 /// 错误信息 /// 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; } } /// /// 根据内码返回仓位信息 /// /// 内码 /// 错误信息 /// 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; } } /// /// 根据内码返回仓位信息(并判断是否在对应的仓库里) /// /// 仓位内码 /// 仓库内码 /// 错误信息 /// 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; } } /// /// 根据内码返回仓位信息(并判断是否在对应的仓库里) /// /// 仓位内码 /// 仓库内码 /// 错误信息 /// 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); } } } }