public DataTable GetProductName()
        {
            DataSet ds = null;

            try
            {
                ds = DbOperate.ExecuteDataSet(sqlSelectGetProductName, null);
                //ds = DbOperate.ExecuteDataSet(
                //          ConfigManager.GetDBConnectString(ConfigManager.GetCurrentDBType()),
                //           sqlSelectGetProductName, null);

                if (ds != null)
                {
                    if (ds.Tables.Count > 0)
                    {
                        return(ds.Tables[0]);
                    }
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show("获取产品名称时出现错误:" + ex.Message);
            }
            return(null);
        }
Beispiel #2
0
        public DataTable GetProductInfoTable(string productID)
        {
            DataSet ds = null;

            try
            {
                ds = DbOperate.ExecuteDataSet(
                    sqlSelectGetProductInfoByID,
                    new object[1] {
                    productID
                });
                if (ds != null)
                {
                    if (ds.Tables.Count > 0)
                    {
                        return(ds.Tables[0]);
                    }
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show("查询数据库时出现错误:" + ex.Message);
            }
            return(null);
        }
        public DataTable GetInStorageProductInfoTable()
        {
            DataSet ds = null;

            try
            {
                ds = DbOperate.ExecuteDataSet(
                    sqlSelectInStorage, null);
                if (ds != null)
                {
                    if (ds.Tables.Count > 0)
                    {
                        return(ds.Tables[0]);
                    }
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show("查询数据库时出现错误:" + ex.Message);
            }
            return(null);
        }
        public DataTable GetInStorageProductInventoryByIDs(string productIDs)
        {
            DataSet ds  = null;
            string  cmd = string.Format(sqlSelectGetProductByIDFormat, productIDs);

            try
            {
                ds = DbOperate.ExecuteDataSet(
                    cmd, null);
                if (ds != null)
                {
                    if (ds.Tables.Count > 0)
                    {
                        return(ds.Tables[0]);
                    }
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show("查询数据库时出现错误:" + ex.Message);
            }
            return(null);
        }