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 DataTable GetStockByVendor(string Vendor,string Root_No,string LocateSection) { try { DBO.QueryItem db = new QueryItem(ref USEDB); return db.GetStockByVendor(Vendor, Root_No, LocateSection); } catch (Exception ex) { throw ex; } }