Esempio n. 1
0
 //更新商品价格
 public bool UpdateSinglePrice(Entity.Items item)
 {
     //int ItemID, string AgoraPrice, string MemberPrice, string VipPrice, string SeckillPrice
     if (helper.ExcuteCommandInt("update Items set AgoraPrice='"
                                 + item.getAgoraPrice() + "',MemberPrice='"
                                 + item.getMemberPrice() + "',VipPrice='"
                                 + item.getVipPrice() + "',SeckillPrice='"
                                 + item.getSeckillPrice() + "' where IID ="
                                 + item.getItemID() + "") > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Esempio n. 2
0
        ////新增(不知道有没有调用?)
        ////public bool AddItems(string Name, string AgoraPrice, string MemberPrice, string VipPrice, string SeckillPrice, string Area, string Details, string Days, string Hours, string Minutes, string Seconds)
        ////{
        ////    //ProductID,BrandID,Name,AgoraPrice,MemberPrice,VipPrice,SeckillPrice,Area,Details,IsSecondKill,LimitTime
        ////    if (helper.ExcuteCommandInt("insert into Items(Name,AgoraPrice,MemberPrice,VipPrice,SeckillPrice,Area,Details,Days,Hours,Minutes,Seconds) values ('"
        ////        + Name + "','" + AgoraPrice + "','" + MemberPrice + "','" + VipPrice + "','" + SeckillPrice + "','" + Area + "','" + Details + "','" + Days + "','" + Hours + "','" + Minutes + "','" + Seconds + "')") > 0)
        ////        return true;
        ////    else
        ////        return false;
        ////}
        //public bool AddItems(Entity.Items items) {
        //    return helper.ExcuteCommandInt("insert into Items(Name,AgoraPrice,MemberPrice,VipPrice,SeckillPrice,Area,Details,Days,Hours,Minutes,Seconds) values ('"
        //            + items.getName() + "','"
        //            + items.getAgoraPrice() + "','"
        //            + items.getMemberPrice() + "','"
        //            + items.getVipPrice()+ "','"
        //            + items.getSeckillPrice()+ "','"
        //            + items.getArea() + "','"
        //            + items.getDetails() + "','"
        //            + items.getDays() + "','"
        //            + items.getHours()+ "','"
        //            + items.getMinutes() + "','"
        //            + items.getSeconds()+ "')") > 0;
        //}

        //新增
        public bool AddItemsInfo(Entity.Items items)
        {
            //ProductID,BrandID,Name,AgoraPrice,MemberPrice,VipPrice,SeckillPrice,Area,Details,IsSecondKill,LimitTime
            return(helper.ExcuteCommandInt("insert into Items(ProductID,BrandID,Name,AgoraPrice,MemberPrice,VipPrice,SeckillPrice,Area,Details,Days,Hours,Minutes,Seconds) values ("
                                           + items.getProductID() + ","
                                           + items.getBrandID() + ",'"
                                           + items.getName() + "','"
                                           + items.getAgoraPrice() + "','"
                                           + items.getMemberPrice() + "','"
                                           + items.getVipPrice() + "','"
                                           + items.getSeckillPrice() + "','"
                                           + items.getArea() + "','"
                                           + items.getDetails() + "','"
                                           + items.getDays() + "','"
                                           + items.getHours() + "','"
                                           + items.getMinutes() + "','"
                                           + items.getSeconds() + "')") > 0);
        }