| | |
| | | //仓库条码 |
| | | if (sBarBillName == "仓库") |
| | | { |
| | | DAL.ClsIF_Warehouse_View dal = new DAL.ClsIF_Warehouse_View(); |
| | | //将递入的条码去掉前三位后转化成整形,TryParse不能转换成整数时返回false,并返回ID=0 |
| | | int ID; |
| | | if (int.TryParse(sBarCode.Remove(0, 3), out ID)) |
| | |
| | | //仓库条码 |
| | | if (sBarBillName == "仓库") |
| | | { |
| | | DAL.ClsIF_Warehouse_View dal = new DAL.ClsIF_Warehouse_View(); |
| | | //将递入的条码去掉前三位后转化成整形,TryParse不能转换成整数时返回false,并返回ID=0 |
| | | int ID; |
| | | if (int.TryParse(sBarCode.Remove(0, 3), out ID)) |
| | | { |
| | | if (dal.GetInfoByID(ID, HOWNERID)) |
| | | { |
| | | oBar.HBarType = "仓库条码"; |
| | | oBar.HWhID = dal.omodel.HItemID; |
| | | oBar.HWhNumber = dal.omodel.HNumber; |
| | | oBar.HWhName = dal.omodel.HName; |
| | | oBar.HSPFlag = dal.omodel.HIsStockMgr; |
| | | return oBar; |
| | | } |
| | | else |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_Gy_Warehouse_PDA " + ID.ToString() + "," + HOWNERID.ToString(), "h_p_Gy_Warehouse_PDA"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "无效仓库条码!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | oBar.HBarType = "仓库条码"; |
| | | oBar.HWhID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HItemID"]); |
| | | oBar.HWhNumber = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HNumber"]); |
| | | oBar.HWhName = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HName"]); |
| | | oBar.HSPFlag = DBUtility.ClsPub.isBool(ds.Tables[0].Rows[0]["HSPFlag"]); |
| | | oBar.HSPID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSPID"]); |
| | | oBar.HSPNumber = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSPNumber"]); |
| | | oBar.HSPName = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSPName"]); |
| | | return oBar; |
| | | } |
| | | } |
| | | else |
| | | { |