/// <summary>
        /// 同步远程产品信息
        /// </summary>
        public static int SynErpProduct()
        {
            int          reNo = 0;
            ProductsInfo pi   = new ProductsInfo();

            try
            {
                DataTable dt = Bdu9ErpDataEngineService.getProductList("");
                foreach (DataRow dr in dt.Rows)
                {
                    if (dr["P_NAME"].ToString().Trim() != "")
                    {
                        if (tbProductsInfo.ExistsProductsInfo(dr["P_NAME"].ToString().Trim()) == false)
                        {
                            pi.pStandard = "";
                            pi.pUnits    = dr["p_rule_min"].ToString().Trim();
                            pi.pMaxUnits = dr["p_rule_max"].ToString().Trim();
                            pi.pToBoxNo  = Utils.StrToInt(dr["p_rules"].ToString().Trim(), 0);
                            pi.pState    = 0;

                            ProductClassInfo pci = DataClass.GetProductClassInfoModel(dr["typename"].ToString().Trim());
                            if (pci != null)
                            {
                                pi.ProductClassID = pci.ProductClassID;
                            }
                            pi.pBrand = dr["typename"].ToString().Trim();
                            pi.pPrice = decimal.Parse(Utils.StrToFloat(dr["a_price"].ToString().Trim(), 0).ToString());

                            pi.pCode       = Utils.GetRanDomCode();
                            pi.pBarcode    = dr["p_code"].ToString().Trim();
                            pi.pName       = dr["p_name"].ToString().Trim();
                            pi.pAppendTime = DateTime.Now;
                            tbProductsInfo.AddProductsInfo(pi);
                            reNo++;
                        }
                    }
                }
            }
            finally
            {
                pi = null;
            }
            return(reNo);
        }
 /// <summary>
 /// 获取产品列表
 /// </summary>
 public static DataTable getERPProductList(string tSQL)
 {
     return(Bdu9ErpDataEngineService.getProductList(tSQL));
 }