public bool GetBarCodeData(string FullBarCode, string LocateSection, out string Item, out string Period, out string Vendor, out int OnHd_Qty, out int Price, out Double Cost, out string TaxType) { bool HasData = false; Item = ""; Period = ""; Vendor = ""; OnHd_Qty = 0; Price = 0; Cost = 0; TaxType = ""; try { DBO.QueryItem dbo = new QueryItem(ref USEDB); INVDBO.MaintainStockStatement dboINV = new INVDBO.MaintainStockStatement(strConn); CGRDBO.CheckPClass dboCGR = new PIC.VDS2G.BSM.CGR.CheckPClass(ref USEDB); HasData = dboCGR.GetItemByBarCode(FullBarCode, out Item, out Period, out Cost); if (HasData == true) { HasData = dbo.GetItemPeriodMain(Item, Period, out Vendor, out Price, out Cost, out TaxType); ArrayList ParameterList = new ArrayList(); ParameterList.Clear(); INVDBO.MaintainStockStatement dbINV = new INVDBO.MaintainStockStatement(strConn); INVDBO.SQLHelper.SQLWhere(ref ParameterList, DbType.String, "LOCATE_SECTION", LocateSection, "=", "and"); INVDBO.SQLHelper.SQLWhere(ref ParameterList, DbType.String, "ITEM", Item, "=", "and"); INVDBO.SQLHelper.SQLWhere(ref ParameterList, DbType.String, "PERIOD", Period, "=", "and"); DataTable dtResult = dboINV.QueryStockStatementByFind_1(ParameterList); if (dtResult.Rows.Count > 0) { OnHd_Qty = int.Parse(dtResult.Rows[0]["onhd_qty"].ToString()); } else { OnHd_Qty = 0; } return true; } else { return false; } } catch (Exception ex) { throw ex; } }
public bool GetBarCodeData(string FullBarCode, out string Item, out string Period, out Double Cost,out string ItemName) { try { Item = string.Empty; Period = string.Empty; Cost = 0; ItemName = string.Empty; DBOCGR.CheckPClass CheckBarCode = new PIC.VDS2G.BSM.CGR.CheckPClass(ref USEDB); CheckBarCode.GetItemByBarCode(FullBarCode, out Item, out Period, out Cost, out ItemName); if (Item != string.Empty && Period != string.Empty) { return true; } else { return false; } } catch (Exception ex) { throw new Exception("呼叫PKG_VDS_ITEM_CHECKPCLASS.GetItemByBarCode()發生錯誤,錯誤訊息:" + ex.Message); } }