public HttpResponseBase DeleteProductFromCategorySet()
        {
            string[] bids = Request.Params["brandids"].Split('|');
            string categoryid = Request.Params["categoryid"];
            string[] pids = Request.Params["productids"].Split('|');
            string resultStr = "{success:false}";
            try
            {
                for (int i = 0; i < bids.Length; i++)
                {
                    if (bids[i].ToString() != "" && pids[i].ToString() != "")
                    {
                        ProductCategorySetMgr _categorySetMgr = new ProductCategorySetMgr(connectionString);
                        ProductCategorySet pcs = new ProductCategorySet();

                        pcs.Brand_Id = Convert.ToUInt32(bids[i]);
                        pcs.Category_Id = Convert.ToUInt32(categoryid);
                        pcs.Product_Id = Convert.ToUInt32(pids[i]);
                        try
                        {
                            _categorySetMgr.DeleteProductByModel(pcs);
                        }
                        catch (Exception)
                        {


                        }
                    }
                }
                resultStr = "{success:true}";
            }

            catch (Exception ex)
            {
                Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage();
                logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message);
                logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
                log.Error(logMessage);
            }


            this.Response.Clear();
            this.Response.Write(resultStr);
            this.Response.End();
            return this.Response;
        }
        /// <summary>
        /// 刪除全館數據
        /// </summary>
        /// <returns></returns>
        public HttpResponseBase DeleteAllClassProductByModel()
        {
            ProductCategorySetMgr _categorySetMgr = new ProductCategorySetMgr(connectionString);
            string categoryid = Request.Params["categoryid"];
            string resultStr = "{success:false}";
            ProductCategorySet pcs = new ProductCategorySet();
            pcs.Brand_Id = 0;
            pcs.Category_Id = Convert.ToUInt32(categoryid);
            pcs.Product_Id = 999999;
            try
            {
                _categorySetMgr.DeleteProductByModel(pcs);
                resultStr = "{success:true}";
            }
            catch (Exception ex)
            {
                Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage();
                logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message);
                logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
                log.Error(logMessage);
            }


            this.Response.Clear();
            this.Response.Write(resultStr);
            this.Response.End();
            return this.Response;
        }