private void ToolStripMenuItemViewMessage_Click(object sender, EventArgs e) { int rowIdx = this.dataGridViewPostSale.CurrentRow.Index; String orderLineItemId = this.dataGridViewPostSale.Rows[rowIdx].Cells[PostSaleDgv_OrderLineItemIdIdx].Value.ToString(); EbayTransactionType trans = EbayTransactionDAL.GetOneTransaction(orderLineItemId); if (trans == null) { return; } AccountType account = AccountUtil.GetAccount(trans.SellerName); if (account == null) { MessageBox.Show(String.Format("此账号{0}未绑定到系统", trans.SellerName), "抱歉", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } FrmUserMessage frmUserMessage = new FrmUserMessage(); frmUserMessage.EbayTransaction = trans; frmUserMessage.Account = account; frmUserMessage.ShowDialog(); if (frmUserMessage.SentMessage || frmUserMessage.MarkMsgAsReplied) { LoadPostSaleData(); } }
private void ToolStripMenuItemViewMessage_Click(object sender, EventArgs e) { int rowIdx = this.dataGridViewPostSale.CurrentRow.Index; String orderLineItemId = this.dataGridViewPostSale.Rows[rowIdx].Cells[PostSaleDgv_OrderLineItemIdIdx].Value.ToString(); EbayTransactionType trans = EbayTransactionDAL.GetOneTransaction(orderLineItemId); if (trans == null) return; AccountType account = AccountUtil.GetAccount(trans.SellerName); if (account == null) { MessageBox.Show(String.Format("此账号{0}未绑定到系统", trans.SellerName), "抱歉", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } FrmUserMessage frmUserMessage = new FrmUserMessage(); frmUserMessage.EbayTransaction = trans; frmUserMessage.Account = account; frmUserMessage.ShowDialog(); if (frmUserMessage.SentMessage || frmUserMessage.MarkMsgAsReplied) { LoadPostSaleData(); } }