private void buttonAskBuyer_Click(object sender, EventArgs e) { DataTable dtTrans = EbayTransactionDAL.GetOneTransactionTable(EbayTransaction.TransactionId); if (dtTrans == null || dtTrans.Rows.Count == 0) { return; } DataTable orderTable = dtTrans.Clone(); DataRow newRow = orderTable.NewRow(); newRow.ItemArray = dtTrans.Rows[0].ItemArray; orderTable.Rows.Add(newRow); FrmSendMessage frm = new FrmSendMessage(); frm.OrdersDataTable = orderTable; frm.StartPosition = FormStartPosition.CenterScreen; frm.ShowDialog(); if (frm.MessageSent) { LoadMsgData(); } }
private void buttonAskBuyer_Click(object sender, EventArgs e) { DataTable dtTrans = EbayTransactionDAL.GetOneTransactionTable(EbayTransaction.TransactionId); if (dtTrans == null || dtTrans.Rows.Count == 0) return; DataTable orderTable = dtTrans.Clone(); DataRow newRow = orderTable.NewRow(); newRow.ItemArray = dtTrans.Rows[0].ItemArray; orderTable.Rows.Add(newRow); FrmSendMessage frm = new FrmSendMessage(); frm.OrdersDataTable = orderTable; frm.StartPosition = FormStartPosition.CenterScreen; frm.ShowDialog(); if (frm.MessageSent) { LoadMsgData(); } }
private void ToolStripMenuItemSendMessageToBuyer_Click(object sender, EventArgs e) { DataGridViewSelectedRowCollection selectedRows = this.dataGridViewPostSale.SelectedRows; DataTable orderTable = AllPostSaleOrdersCacheTable.Clone(); foreach (DataGridViewRow row in selectedRows) { String orderLineItemId = row.Cells[PostSaleDgv_OrderLineItemIdIdx].Value.ToString(); DataRow orderRow = getPostSaleOrderLocally(orderLineItemId); DataRow newOrderRow = orderTable.NewRow(); newOrderRow.ItemArray = orderRow.ItemArray; orderTable.Rows.Add(newOrderRow); } FrmSendMessage frmSendMessage = new FrmSendMessage(); frmSendMessage.StartPosition = FormStartPosition.CenterScreen; frmSendMessage.OrdersDataTable = orderTable; frmSendMessage.ShowDialog(this); LoadPostSaleData(); }