private void ReturnToStoreForQuantityEdit() { //TODO: finish updating the changed locations MyGeneration.dOOdads.TransactionMgr transaction = MyGeneration.dOOdads.TransactionMgr.ThreadTransactionMgr(); transaction.BeginTransaction(); try { PalletLocation pl = new PalletLocation(); String reference = gridReceiveView.GetFocusedDataRow()["RefNo"].ToString(); int ReceiptID = Convert.ToInt32(gridReceiveView.GetFocusedDataRow()["ReceiptID"]); if (gridDetailView.DataSource == null) return; BLL.ReceiveDoc recDoc = new ReceiveDoc(); recDoc.LoadByReceiptID(ReceiptID); recDoc.SetStatusAsDraft(CurrentContext.UserId); BLL.Receipt receiptStatus = new BLL.Receipt(); receiptStatus.LoadByPrimaryKey(ReceiptID); receiptStatus.ChangeStatus(ReceiptConfirmationStatus.Constants.DRAFT_RECEIPT, null, this.GetFormIdentifier(), CurrentContext.UserId, "Returned To Draft"); transaction.CommitTransaction(); XtraMessageBox.Show("Receipt Returned!", "Success", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information); BindFormContents(); } catch (Exception exp) { transaction.RollbackTransaction(); XtraMessageBox.Show(exp.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }