Exemplo n.º 1
0
        // TODO: Move to service layer
        private void unReceiveLink_OpenLink(object sender, OpenLinkEventArgs e)
        {
            Receipt receipt = processedView.GetFocusedRow() as Receipt;

            if (receipt != null)
            {
                DialogResult ans;
                string       delQuestion = "Are you sure you want to remove "
                                           + receipt.UnitTrackingId +
                                           " from this order?";

                if (Scout.Core.UserInteraction.Dialog.AskQuestion(delQuestion) == DialogResult.Yes)
                {
                    try
                    {
                        Cursor.Current = Cursors.WaitCursor;
                        m_receiving.DeleteReceipt(receipt);
                        LoadOrderProcessResults();
                    }
                    finally
                    {
                        Cursor.Current = Cursors.Default;
                    }
                }
            }
        }