Exemplo n.º 1
0
        private void ToolStripMenuItemLeaveFeedback_Click(object sender, EventArgs e)
        {
            DataGridViewSelectedRowCollection selectedRows = this.dataGridViewAllOrders.SelectedRows;

            foreach (DataGridViewRow row in selectedRows)
            {
                String orderLineItemId    = row.Cells[OrderDgv_OrderLineItemIndex].Value.ToString();
                EbayTransactionType trans = EbayTransactionDAL.GetOneTransaction(orderLineItemId);
                if (trans == null)
                {
                    continue;
                }

                AccountType account = AccountUtil.GetAccount(trans.SellerName);
                if (account == null)
                {
                    continue;
                }

                EbayTransactionBiz.LeaveFeedback(account, trans.OrderId, trans.BuyerId, trans.ItemId, trans.EbayTransactionId);

                EbayTransactionDAL.UpdateTransactionSellerLeftFeedback(trans.TransactionId, true);

                row.Cells[OrderDgv_SellerLeftFeedbackIndex].Value = 1;
            }

            MessageBox.Show("留好评成功", "恭喜", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }