コード例 #1
0
 private void grdProducts_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     if (!this.order.CheckAction(OrderActions.SELLER_MODIFY_TRADE))
     {
         this.ShowMsg("你当前订单的状态不能进行修改订单费用操作", false);
     }
     else if (this.order.LineItems.Values.Count <= 1)
     {
         this.ShowMsg("订单的最后一件商品不允许删除", false);
     }
     else if (SubsiteSalesHelper.DeleteOrderProduct(this.grdProducts.DataKeys[e.RowIndex].Value.ToString(), this.order))
     {
         this.order = SubsiteSalesHelper.GetOrderInfo(this.orderId);
         this.BindProductList(this.order);
         this.BindTatolAmount(this.order);
         this.ShowMsg("成功删除了一件商品", true);
     }
     else
     {
         this.ShowMsg("删除商品失败", false);
     }
 }