Exemple #1
0
    public static string GetBarCodeData(string txtBarCodeText, string LocateSection)
    {
        bool HaveData = false;
        string item = string.Empty;
        string period = string.Empty;
        string vendor = string.Empty;
        int OnHd_Qty = 0;
        int Price = 0;
        double Cost = 0;
        string TaxType = string.Empty;

        VGRModel.MaintainReturnData BCO = new VGRModel.MaintainReturnData(ConntionDB);
        HaveData = BCO.GetBarCodeData(txtBarCodeText, LocateSection, out item, out period, out vendor, out OnHd_Qty, out Price, out Cost, out TaxType);

        if (HaveData == true)
            return item + "," + period + "," + vendor + "," + OnHd_Qty.ToString() + "," + Price + "," + Cost.ToString() + "," + TaxType;
        else
            return "";
    }
        public bool GetBarCodeData(string FullBarCode, string LocateSection, out string Item, out string Period, out int OnHd_Qty, out Double Cost)
        {
            try
            {
                bool HaveDate = false;

                Item = string.Empty;
                Period = string.Empty;
                string Vendor = "";
                OnHd_Qty = 0;
                int Price = 0;
                Cost = 0;
                string TaxType = "";

                DBOVGR.MaintainReturnData CheckBarCode = new DBOVGR.MaintainReturnData(strConn);
                HaveDate = CheckBarCode.GetBarCodeData(FullBarCode, LocateSection, out Item, out Period, out Vendor, out OnHd_Qty, out Price, out Cost, out TaxType);
                if (Item != string.Empty && Period != string.Empty)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }