public PMTransaction GetPMKeysInfo(string trxNumber, string vendorID)
        {
            PMTransaction pmTrx = new PMTransaction();

            try
            {
                DataTable dataTable = DataAccess.GetPMKeysInfo(trxNumber, vendorID);
                if (dataTable.Rows.Count == 1)
                {
                    pmTrx = ObjectMapper.DataRowToObject <PMTransaction>(dataTable.Rows[0]);
                }

                return(pmTrx);
            }
            catch (Exception ex)
            {
                MessageBox.Show("An error occurred in Controller.GetPMTransaction: " + ex.Message);
                return(pmTrx);
            }
        }
        private void ViewTransaction()
        {
            //If View Transaction was clicked or row was double clicked
            try
            {
                if (dataGrid.Rows.Count > 0)
                {
                    string fieldName = Controller.Instance.Model.PMVendorLabel + "ID";
                    string trxNumber = dataGrid.Rows[dataGrid.SelectedRows[0].Index].Cells["TrxNumber"].Value.ToString();
                    string vendorID  = dataGrid.Rows[dataGrid.SelectedRows[0].Index].Cells[fieldName].Value.ToString();

                    if (!string.IsNullOrEmpty(trxNumber) && !string.IsNullOrEmpty(vendorID))
                    {
                        PMTransaction pmTrx = Controller.Instance.GetPMKeysInfo(trxNumber, vendorID);
                        //OpenPMTransactionInquiry(pmTrx);
                        OpenPMDocumentInquiry(pmTrx);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("An error occurred reading the master ID: " + ex.Message, "Error", MessageBoxButtons.OK);
            }
        }