//更新秒杀信息 //public bool UpdateSingleItem(int ItemID, string Days, string Hours, string Minutes, string Seconds, string IsSecondKill) //{ // if (helper.ExcuteCommandInt("update Items set Days='" // + Days + "',Hours='" + Hours + "',Minutes='" + Minutes + "',Seconds='" + Seconds + "',IsSecondKill='" + IsSecondKill + "' where IID=" + ItemID + "") > 0) // return true; // else // return false; //} public bool UpdateSingleItemSeckill(Entity.Items items) { if (helper.ExcuteCommandInt("update Items set Days='" + items.getDays() + "',Hours='" + items.getHours() + "',Minutes='" + items.getMinutes() + "',Seconds='" + items.getSeconds() + "',IsSecondKill='" + items.getIsSecondKill() + "' where IID=" + items.getItemID() + "") > 0) { return(true); } else { return(false); } }
////新增(不知道有没有调用?) ////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); }