private void selectButton_Click(object sender, EventArgs e) { int row = dataGridView.CurrentRow.Index; selectedTrans = int.Parse(dataGridView[0, row].Value.ToString()); //update a list with the information from that transaction suspended = Services.DataTransfer.RetrieveDBTransactionInfo(selectedTrans); //update a list with all the items with transaction # selectedTrans List <ItemTrans> listDB = new List <ItemTrans>(Services.DataTransfer.RetrieveItemsDB(selectedTrans)); //delete previously stored transaction items with selectedTrans if (!Services.DataTransfer.DeleteItemsWithTransNum(selectedTrans)) { MessageBox.Show("Error Deleting Old Items with Transaction Number: " + selectedTrans, "ERROR!"); } else { //delete the old data with old transaction number if (!Services.DataTransfer.DeleteTransaction(selectedTrans)) { MessageBox.Show("Error Deleting Old Transaction Info in Transactions.Transactions DB", "ERROR!"); } } //open the receiving window with suspended list ManualDelivery ss = new ManualDelivery(Services.DataTransfer.GetVendorNumFromName(suspended.ElementAt(1))); ss.SetList(listDB); ss.Show(); this.Close(); }
private void deliveryBtn_Click(object sender, EventArgs e) { this.Hide(); ManualDelivery ss = new ManualDelivery(int.Parse(idLbl.Text)); ss.Show(this); }