Пример #1
0
 //更新商品信息
 //public bool UpdateSingleItem(int ItemID, int ProductID, int BrandID, string Name, string Area)
 //{
 //    if (helper.ExcuteCommandInt("update Items set ProductID=" + ProductID + ",BrandID=" + BrandID + ", Name='" + Name + "', Area='" + Area + "' where IID =" + ItemID + "") > 0)
 //        return true;
 //    else
 //        return false;
 //}
 public bool UpdateSingleItem(Entity.Items item)
 {
     return(helper.ExcuteCommandInt("update Items set ProductID="
                                    + item.getProductID() + ",BrandID="
                                    + item.getBrandID() + ", Name='"
                                    + item.getName() + "', Area='"
                                    + item.getArea() + "' where IID ="
                                    + item.getItemID() + "") > 0);
 }
Пример #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);
        }