private void OpenPMDocumentInquiry(PMTransaction pmTrx) { if (string.IsNullOrEmpty(pmTrx.VENDORID) || string.IsNullOrEmpty(pmTrx.DOCNUMBR)) { return; } if (pmTrx.DOCTYPE == 6) { OpenPMPaymentInquiry(pmTrx); } else { if (pmTrx.BCHSOURC == "PM_Trxent") { OpenPMTransactionInquiry(pmTrx); } else if (pmTrx.BCHSOURC == "Rcvg Trx Ivc") { POPTransaction popTrx = Controller.Instance.GetPOPTransaction(pmTrx.VENDORID, pmTrx.CNTRLNUM, pmTrx.DOCNUMBR); if (popTrx != null) { OpenPOPInvoiceInquiry(popTrx); } else { MessageBox.Show("Unable to retrieve POP transaction for vendor " + pmTrx.VENDORID + " voucher " + pmTrx.CNTRLNUM); } } } }
private void OpenPOPInvoiceInquiry(POPTransaction popTrx) { if (string.IsNullOrEmpty(popTrx.VENDORID) || string.IsNullOrEmpty(popTrx.POPRCTNM)) { return; } else { //Set flag to return focus to Search window after GP inquiry window is closed Controller.Instance.Model.PMSearchFocus = true; //OpenWindow is available under FUNCTIONS, not Procedures, with this particular Purchasing window Dynamics.Forms.PopInquiryInvoiceEntry.Functions.OpenWindow.Invoke(popTrx.POPRCTNM, 2, 3, 1); } }
public POPTransaction GetPOPTransaction(string vendorID, string voucherNumber, string docNumber) { POPTransaction pmTrx = new POPTransaction(); try { DataTable dataTable = DataAccess.GetPOPTransactionInfo(vendorID, docNumber, voucherNumber); if (dataTable.Rows.Count == 1) { pmTrx = ObjectMapper.DataRowToObject <POPTransaction>(dataTable.Rows[0]); } return(pmTrx); } catch (Exception ex) { MessageBox.Show("An error occurred in Controller.GetPOPTransaction: " + ex.Message); return(pmTrx); } }