Beispiel #1
0
 public bool Delete(string _productNO)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("DELETE FROM");
     sql.Append(" [Tbl_Product]");
     sql.Append(" WHERE");
     sql.Append(" [ProductNO]=@ProductNO");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@ProductNO",_productNO)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
Beispiel #2
0
 public bool Delete(int _attrID)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("DELETE FROM");
     sql.Append(" [Tbl_ProductAttr]");
     sql.Append(" WHERE");
     sql.Append(" [AttrID]=@AttrID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@AttrID",_attrID)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
Beispiel #3
0
        public bool Insert(HotKeyWordInfo hotKeyWordInfo)
        {
            StringBuilder sql=new StringBuilder();
            sql.Append("INSERT INTO");
            sql.Append(" [Tbl_HotKeyWord](");
            sql.Append("[KeyWord],");
            sql.Append("[CateID],");
            sql.Append("[OrderID]");
            sql.Append(") VALUES(");
            sql.Append("@KeyWord,");
            sql.Append("@CateID,");
            sql.Append("@OrderID");
            sql.Append(")");

            using(NetShopHelper dbhelper=new NetShopHelper())
            {
                IDbDataParameter[] p_Parms=new IDbDataParameter[]{
                    dbhelper.CreateParameter("@KeyWord",hotKeyWordInfo.KeyWord),
                    dbhelper.CreateParameter("@CateID",hotKeyWordInfo.CateID),
                    dbhelper.CreateParameter("@OrderID",hotKeyWordInfo.OrderID)
                };
            return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
            }
        }
Beispiel #4
0
        public bool Insert(AutoNumInfo autoNumInfo)
        {
            StringBuilder sql=new StringBuilder();
            sql.Append("INSERT INTO");
            sql.Append(" [AutoNum](");
            sql.Append("[KeyID],");
            sql.Append("[Seed],");
            sql.Append("[SeedDate],");
            sql.Append("[Prefix],");
            sql.Append("[Summary]");
            sql.Append(") VALUES(");
            sql.Append("@KeyID,");
            sql.Append("@Seed,");
            sql.Append("@SeedDate,");
            sql.Append("@Prefix,");
            sql.Append("@Summary");
            sql.Append(")");

            using(NetShopHelper dbhelper=new NetShopHelper())
            {
                IDbDataParameter[] p_Parms=new IDbDataParameter[]{
                    dbhelper.CreateParameter("@KeyID",autoNumInfo.KeyID),
                    dbhelper.CreateParameter("@Seed",autoNumInfo.Seed),
                    dbhelper.CreateParameter("@SeedDate",autoNumInfo.SeedDate),
                    dbhelper.CreateParameter("@Prefix",autoNumInfo.Prefix),
                    dbhelper.CreateParameter("@Summary",autoNumInfo.Summary)
                };
            return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
            }
        }
Beispiel #5
0
 public bool Update(AutoNumInfo autoNumInfo)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("UPDATE");
     sql.Append(" [AutoNum]");
     sql.Append(" SET");
     sql.Append(" [Seed]=@Seed,");
     sql.Append(" [SeedDate]=@SeedDate,");
     sql.Append(" [Prefix]=@Prefix,");
     sql.Append(" [Summary]=@Summary");
     sql.Append(" WHERE");
     sql.Append(" [KeyID]=@KeyID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@KeyID",autoNumInfo.KeyID)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
Beispiel #6
0
 public bool Update(ProductPicInfo productPicInfo)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("UPDATE");
     sql.Append(" [Tbl_ProductPic]");
     sql.Append(" SET");
     sql.Append(" [OrderID]=@OrderID,");
     sql.Append(" [ProductNO]=@ProductNO,");
     sql.Append(" [SmallPic]=@SmallPic,");
     sql.Append(" [MidPic]=@MidPic,");
     sql.Append(" [BigPic]=@BigPic");
     sql.Append(" WHERE");
     sql.Append(" [ID]=@ID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@ID",productPicInfo.Id)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
Beispiel #7
0
        public bool Insert(CustomerInfo customerInfo)
        {
            StringBuilder sql=new StringBuilder();
            sql.Append("INSERT INTO");
            sql.Append(" [Tbl_Customer](");
            sql.Append("[CustomerNO],");
            sql.Append("[Email],");
            sql.Append("[Password],");
            sql.Append("[NickName],");
            sql.Append("[Telephone],");
            sql.Append("[Mobile]");
            sql.Append(") VALUES(");
            sql.Append("@CustomerNO,");
            sql.Append("@Email,");
            sql.Append("@Password,");
            sql.Append("@NickName,");
            sql.Append("@Telephone,");
            sql.Append("@Mobile");
            sql.Append(")");

            using(NetShopHelper dbhelper=new NetShopHelper())
            {
                IDbDataParameter[] p_Parms=new IDbDataParameter[]{
                    dbhelper.CreateParameter("@CustomerNO",customerInfo.CustomerNO),
                    dbhelper.CreateParameter("@Email",customerInfo.Email),
                    dbhelper.CreateParameter("@Password",customerInfo.Password),
                    dbhelper.CreateParameter("@NickName",customerInfo.NickName),
                    dbhelper.CreateParameter("@Telephone",customerInfo.Telephone),
                    dbhelper.CreateParameter("@Mobile",customerInfo.Mobile)
                };
            return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
            }
        }
Beispiel #8
0
 public bool Update(ProductAttrInfo productAttrInfo)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("UPDATE");
     sql.Append(" [Tbl_ProductAttr]");
     sql.Append(" SET");
     sql.Append(" [CateID]=@CateID,");
     sql.Append(" [AttrName]=@AttrName");
     sql.Append(" WHERE");
     sql.Append(" [AttrID]=@AttrID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@AttrID",productAttrInfo.AttrID)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
Beispiel #9
0
 public bool Update(BrandInfo brandInfo)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("UPDATE");
     sql.Append(" [Tbl_Brand]");
     sql.Append(" SET");
     sql.Append(" [CateID]=@CateID,");
     sql.Append(" [NickName]=@NickName,");
     sql.Append(" [BrandName]=@BrandName,");
     sql.Append(" [OrderID]=@OrderID");
     sql.Append(" WHERE");
     sql.Append(" [ID]=@ID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@ID",brandInfo.Id)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
        public bool Insert(ProductAnswerInfo productAnswerInfo)
        {
            StringBuilder sql=new StringBuilder();
            sql.Append("INSERT INTO");
            sql.Append(" [Tbl_ProductAnswer](");
            sql.Append("[ID],");
            sql.Append("[ProductNO],");
            sql.Append("[ServiceType],");
            sql.Append("[Ask],");
            sql.Append("[Answer],");
            sql.Append("[YesCount],");
            sql.Append("[NoCount]");
            sql.Append(") VALUES(");
            sql.Append("@ID,");
            sql.Append("@ProductNO,");
            sql.Append("@ServiceType,");
            sql.Append("@Ask,");
            sql.Append("@Answer,");
            sql.Append("@YesCount,");
            sql.Append("@NoCount");
            sql.Append(")");

            using(NetShopHelper dbhelper=new NetShopHelper())
            {
                IDbDataParameter[] p_Parms=new IDbDataParameter[]{
                    dbhelper.CreateParameter("@ID",productAnswerInfo.Id),
                    dbhelper.CreateParameter("@ProductNO",productAnswerInfo.ProductNO),
                    dbhelper.CreateParameter("@ServiceType",productAnswerInfo.ServiceType),
                    dbhelper.CreateParameter("@Ask",productAnswerInfo.Ask),
                    dbhelper.CreateParameter("@Answer",productAnswerInfo.Answer),
                    dbhelper.CreateParameter("@YesCount",productAnswerInfo.YesCount),
                    dbhelper.CreateParameter("@NoCount",productAnswerInfo.NoCount)
                };
            return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
            }
        }
 public bool Update(ProductAnswerInfo productAnswerInfo)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("UPDATE");
     sql.Append(" [Tbl_ProductAnswer]");
     sql.Append(" SET");
     sql.Append(" [ProductNO]=@ProductNO,");
     sql.Append(" [ServiceType]=@ServiceType,");
     sql.Append(" [Ask]=@Ask,");
     sql.Append(" [Answer]=@Answer,");
     sql.Append(" [YesCount]=@YesCount,");
     sql.Append(" [NoCount]=@NoCount");
     sql.Append(" WHERE");
     sql.Append(" [ID]=@ID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@ID",productAnswerInfo.Id)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
        public bool Insert(ProductAttrValueInfo productAttrValueInfo)
        {
            StringBuilder sql=new StringBuilder();
            sql.Append("INSERT INTO");
            sql.Append(" [Tbl_ProductAttrValue](");
            sql.Append("[ProID],");
            sql.Append("[AttrID],");
            sql.Append("[AttrValue]");
            sql.Append(") VALUES(");
            sql.Append("@ProID,");
            sql.Append("@AttrID,");
            sql.Append("@AttrValue");
            sql.Append(")");

            using(NetShopHelper dbhelper=new NetShopHelper())
            {
                IDbDataParameter[] p_Parms=new IDbDataParameter[]{
                    dbhelper.CreateParameter("@ProID",productAttrValueInfo.ProID),
                    dbhelper.CreateParameter("@AttrID",productAttrValueInfo.AttrID),
                    dbhelper.CreateParameter("@AttrValue",productAttrValueInfo.AttrValue)
                };
            return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
            }
        }
Beispiel #13
0
        public bool Insert(ProductExInfo productExInfo)
        {
            StringBuilder sql=new StringBuilder();
            sql.Append("INSERT INTO");
            sql.Append(" [Tbl_ProductEx](");
            sql.Append("[ProductNO],");
            sql.Append("[Intro],");
            sql.Append("[Standards],");
            sql.Append("[Packing],");
            sql.Append("[Service]");
            sql.Append(") VALUES(");
            sql.Append("@ProductNO,");
            sql.Append("@Intro,");
            sql.Append("@Standards,");
            sql.Append("@Packing,");
            sql.Append("@Service");
            sql.Append(")");

            using(NetShopHelper dbhelper=new NetShopHelper())
            {
                IDbDataParameter[] p_Parms=new IDbDataParameter[]{
                    dbhelper.CreateParameter("@ProductNO",productExInfo.ProductNO),
                    dbhelper.CreateParameter("@Intro",productExInfo.Intro),
                    dbhelper.CreateParameter("@Standards",productExInfo.Standards),
                    dbhelper.CreateParameter("@Packing",productExInfo.Packing),
                    dbhelper.CreateParameter("@Service",productExInfo.Service)
                };
            return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
            }
        }
Beispiel #14
0
 public bool Update(ProductExInfo productExInfo)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("UPDATE");
     sql.Append(" [Tbl_ProductEx]");
     sql.Append(" SET");
     sql.Append(" [Intro]=@Intro,");
     sql.Append(" [Standards]=@Standards,");
     sql.Append(" [Packing]=@Packing,");
     sql.Append(" [Service]=@Service");
     sql.Append(" WHERE");
     sql.Append(" [ProductNO]=@ProductNO");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@ProductNO",productExInfo.ProductNO)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
Beispiel #15
0
 public bool Update(PriceLevelInfo priceLevelInfo)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("UPDATE");
     sql.Append(" [Tbl_PriceLevel]");
     sql.Append(" SET");
     sql.Append(" [CateID]=@CateID,");
     sql.Append(" [NickName]=@NickName,");
     sql.Append(" [StartPrice]=@StartPrice,");
     sql.Append(" [EndPrice]=@EndPrice,");
     sql.Append(" [OrderID]=@OrderID");
     sql.Append(" WHERE");
     sql.Append(" [ID]=@ID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@ID",priceLevelInfo.Id)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
 public bool Update(ProductCommentInfo productCommentInfo)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("UPDATE");
     sql.Append(" [Tbl_ProductComment]");
     sql.Append(" SET");
     sql.Append(" [ProductNO]=@ProductNO,");
     sql.Append(" [Title]=@Title,");
     sql.Append(" [Merits]=@Merits,");
     sql.Append(" [Demerits]=@Demerits,");
     sql.Append(" [Summary]=@Summary,");
     sql.Append(" [Star]=@Star,");
     sql.Append(" [ReplyCount]=@ReplyCount");
     sql.Append(" WHERE");
     sql.Append(" [ID]=@ID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@ID",productCommentInfo.Id)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
 public bool Update(ProductCommentReplyInfo productCommentReplyInfo)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("UPDATE");
     sql.Append(" [Tbl_ProductCommentReply]");
     sql.Append(" SET");
     sql.Append(" [CommentID]=@CommentID,");
     sql.Append(" [Summary]=@Summary");
     sql.Append(" WHERE");
     sql.Append(" [ID]=@ID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@ID",productCommentReplyInfo.Id)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
Beispiel #18
0
 public bool Update(ProductInfo productInfo)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("UPDATE");
     sql.Append(" [Tbl_Product]");
     sql.Append(" SET");
     sql.Append(" [CateIDPath]=@CateIDPath,");
     sql.Append(" [NickName]=@NickName,");
     sql.Append(" [ProductName]=@ProductName,");
     sql.Append(" [MarketPrice]=@MarketPrice,");
     sql.Append(" [InnerPrice]=@InnerPrice,");
     sql.Append(" [BrandID]=@BrandID,");
     sql.Append(" [BrandName]=@BrandName");
     sql.Append(" WHERE");
     sql.Append(" [ProductNO]=@ProductNO");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@ProductNO",productInfo.ProductNO)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
Beispiel #19
0
 public bool Update(CustomerInfo customerInfo)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("UPDATE");
     sql.Append(" [Tbl_Customer]");
     sql.Append(" SET");
     sql.Append(" [Email]=@Email,");
     sql.Append(" [Password]=@Password,");
     sql.Append(" [NickName]=@NickName,");
     sql.Append(" [Telephone]=@Telephone,");
     sql.Append(" [Mobile]=@Mobile");
     sql.Append(" WHERE");
     sql.Append(" [CustomerNO]=@CustomerNO");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@CustomerNO",customerInfo.CustomerNO)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }
Beispiel #20
0
        public bool Insert(ProductInfo productInfo)
        {
            StringBuilder sql=new StringBuilder();
            sql.Append("INSERT INTO");
            sql.Append(" [Tbl_Product](");
            sql.Append("[ProductNO],");
            sql.Append("[CateIDPath],");
            sql.Append("[NickName],");
            sql.Append("[ProductName],");
            sql.Append("[MarketPrice],");
            sql.Append("[InnerPrice],");
            sql.Append("[BrandID],");
            sql.Append("[BrandName]");
            sql.Append(") VALUES(");
            sql.Append("@ProductNO,");
            sql.Append("@CateIDPath,");
            sql.Append("@NickName,");
            sql.Append("@ProductName,");
            sql.Append("@MarketPrice,");
            sql.Append("@InnerPrice,");
            sql.Append("@BrandID,");
            sql.Append("@BrandName");
            sql.Append(")");

            using(NetShopHelper dbhelper=new NetShopHelper())
            {
                IDbDataParameter[] p_Parms=new IDbDataParameter[]{
                    dbhelper.CreateParameter("@ProductNO",productInfo.ProductNO),
                    dbhelper.CreateParameter("@CateIDPath",productInfo.CateIDPath),
                    dbhelper.CreateParameter("@NickName",productInfo.NickName),
                    dbhelper.CreateParameter("@ProductName",productInfo.ProductName),
                    dbhelper.CreateParameter("@MarketPrice",productInfo.MarketPrice),
                    dbhelper.CreateParameter("@InnerPrice",productInfo.InnerPrice),
                    dbhelper.CreateParameter("@BrandID",productInfo.BrandID),
                    dbhelper.CreateParameter("@BrandName",productInfo.BrandName)
                };
            return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
            }
        }
Beispiel #21
0
 public bool Update(CategoryInfo categoryInfo)
 {
     StringBuilder sql = new StringBuilder();
     sql.Append("UPDATE");
     sql.Append(" [Tbl_Category]");
     sql.Append(" SET");
     sql.Append(" [CateName]=@CateName,");
     sql.Append(" [ParentID]=@ParentID,");
     sql.Append(" [LevelID]=@LevelID,");
     sql.Append(" [OrderID]=@OrderID,");
     sql.Append(" [FullPath]=@FullPath,");
     sql.Append(" [PageUrl]=@PageUrl");
     sql.Append(" WHERE");
     sql.Append(" [ID]=@ID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@ID",categoryInfo.Id)
       };
      return 0 < dbhelper.ExecuteNonQuery(sql.ToString(),p_Parms);
     }
 }