コード例 #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 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);
     }
 }
コード例 #3
0
 //更新秒杀信息
 //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);
     }
 }