Exemplo n.º 1
0
 private void grdProducts_ItemCommand(object sender, RepeaterCommandEventArgs e)//删除单个商品
 {
     if (e.CommandName == "Delete")
     {
         if (ProductHelper.DelPointsForProduct(e.CommandArgument.ToString()) > 0)
         {
             this.ShowMsg("删除商品成功!", true);
             this.ReloadProductOnSales(false);
         }
         else
         {
             this.ShowMsg("删除商品失败!", false);
         }
     }
     else if (e.CommandName == "UnSaleProduct")
     {
         if (ProductHelper.OffShelf(e.CommandArgument.ToString()) > 0)
         {
             this.ShowMsg("成功下架了选择的商品,您可以在下架区的商品里面找到下架以后的商品", true);
             this.BindProducts();
         }
         else
         {
             this.ShowMsg("下架商品失败,未知错误", false);
         }
     }
 }