コード例 #1
0
ファイル: ScheduleItemMgr.cs プロジェクト: lxh2014/gigade-net
        public bool Delete(int schedule, string ids, string item_type, string item_value)
        {
            try
            {
                ArrayList arrayList = new ArrayList();
                //獲得供應商對應旗下的商品id集合
                IProductImplDao _productDao = new ProductDao(conStr);
                IScheduleRelationImplDao _scheduleDao = new ScheduleRelationDao(conStr);
                List<Product> listProduct = _productDao.GetProductByVendor(Convert.ToInt32(item_value));
                string id = "";
                foreach (var item in listProduct) //連接id
                {
                    id += item.Product_Id + ",";
                }
                id = id.Remove(id.Length - 1, 1);

                arrayList.Add(_scheduleDao.Delete(item_type, id, schedule));
                arrayList.Add(_scheduleItemDao.Delete(schedule, ids));
                MySqlDao sqlDao = new MySqlDao(conStr);
                return sqlDao.ExcuteSqls(arrayList);
            }
            catch (Exception ex)
            {
                throw new Exception("ScheduleItemMgr-->Delete" + ex.Message, ex); ;
            }
        }
コード例 #2
0
ファイル: ProductMgr.cs プロジェクト: lxh2014/gigade-net
 public ProductMgr(string connectionStr)
 {
     _productDao = new ProductDao(connectionStr);
     _productPicDao = new ProductPictureDao(connectionStr);
     pmDao = new PriceMasterDao(connectionStr);
     pmTSDao = new PriceMasterTsDao(connectionStr);
     puApplyDao = new PriceUpdateApplyDao(connectionStr);
     this.connectionStr = connectionStr;
     _mysqlDao = new MySqlDao(connectionStr);
     productDao = new ProductDao(connectionStr);
     _rProductAttribute = new RecommendedProductAttributeDao(connectionStr);
 }
コード例 #3
0
 public PromotionsAmountDiscountMgr(string connectionstring)
 {
     _mysqlDao = new MySqlDao(connectionstring);
     _padDao = new PromotionsAmountDiscountDao(connectionstring);
     _prodpromoDao = new ProdPromoDao(connectionstring);
     _proCateDao = new ProductCategoryDao(connectionstring);
     _prodCategSet = new ProductCategorySetDao(connectionstring);
     _proAllDao = new PromoAllDao(connectionstring);
     _usconDao = new UserConditionDao(connectionstring);
     _promoDisDao = new PromoDiscountDao(connectionstring);
     _promoMainDao = new PromotionsMaintainDao(connectionstring);
     _prodDao = new ProductDao(connectionstring);
     _vendorBrandDao = new VendorBrandDao(connectionstring);
     connStr = connectionstring;
 }
コード例 #4
0
 /// <summary>
 /// 有參構造函數
 /// </summary>
 /// <param name="connectionstring">數據庫連接字符串</param>
 public PromotionsAmountGiftDao(string connectionstring)
 {
     _access = DBFactory.getDBAccess(DBType.MySql, connectionstring);
     this.connStr = connectionstring;
     _proCateDao = new ProductCategoryDao(connectionstring);
     _prodCategSetDao = new ProductCategorySetDao(connectionstring);
     _prodpromoDao = new ProdPromoDao(connectionstring);
     _proAllDao = new PromoAllDao(connectionstring);
     _usconDao = new UserConditionDao(connectionstring);
     _promoDisDao = new PromoDiscountDao(connectionstring);
     _serialDao = new SerialDao(connectionstring);
     _ptDao = new PromoTicketDao(connectionstring);
     _prodDao = new ProductDao(connectionstring);
     _promoMainDao = new PromotionsMaintainDao(connectionstring);
     _vendorBrandDao = new VendorBrandDao(connectionstring);
 }