public string UpdateERP_ID() { string connString = Request.Params["connString"]; int resut = 0; int total_count = 0; try { proItem_Dao = new ProductItemDao(connString); pro_Dao = new ProductDao(connString); List<Product> proList = pro_Dao.Query(new Product()); total_count = proList.Count; foreach (Product p in proList) { try { proItem_Dao.UpdateErpId(p.Product_Id.ToString()); resut++; } catch { } } } catch (Exception ex) { return string.Format("error:{0}", ex.Message); } return string.Format("total:{0},updated:{1}", total_count, resut); }
public ProductItemMgr(string connectionStr) { this.connectionStr = connectionStr; _productItemDao = new ProductItemDao(connectionStr); _serialMgr = new SerialMgr(connectionStr); productItemDao = new ProductItemDao(connectionStr); _functionMgr = new FunctionMgr(connectionStr); }
public OrderReturnStatusDao(string connectionstring) { _access = DBFactory.getDBAccess(DBType.MySql, connectionstring); _ordermasterdao = new OrderMasterDao(connectionstring); _orderDetailDao = new OrderDetailDao(connectionstring); _orderMoneyReturnDao = new OrderMoneyReturnDao(connectionstring); _vipuserGroupDao = new VipUserGroupDao(connectionstring); _itemDao = new ProductItemDao(connectionstring); _userRecommendDao = new UserRecommendDao(connectionstring); _mySqlDao = new MySqlDao(connectionstring); this.connStr = connectionstring; }