//Purpose: Calls the Billing Entity Search in order to retrieve the billing entity id // and billing entity display value //Author: Tonya Luff TL4790 // 08/11/00 // private void cmdBESearch_Click(Object eventSender, EventArgs eventArgs) { int nSelection_type = 0; int lStatus = 0; ProFitData.gFRWKSVC.SysLog("frmCollectionLetter::cmdBESearch_Click:Enter", LogLevel.logDebug3); try { cmdBESearch.Enabled = false; nSelection_type = 1; //create the BESearch object oBESearch = new PatientAccountingSearch.CBESearch(); if (oBESearch == null) { ProFitData.gFRWKSVC.SysLog("Error creating billing entity search", LogLevel.logDebug3); return; } oBESearch.Parent = mParent.Parent; //?? optional parameter of active selection?? lStatus = oBESearch.lFindBEFG(nSelection_type, ProFitData.gFRWKSVC.domain, ProFitData.gFRWKSVC.User, PatientAccountingSearch.CBESearch.besearch_active_enum.pftBE_Active_Only); if (lStatus != ProFitData.PFT_SUCCESS) { ProFitData.gFRWKSVC.SysLog("Error in billing entity search", LogLevel.logDebug3); return; } else { //normal termination ProFitData.gFRWKSVC.SysLog("frmCollectionLetter::cmdBESearch_Click - Exit", LogLevel.logAudit2); return; } } catch (System.Exception _exception_) { Cerner.Foundations.Logging.ExceptionReporting.ReportException(_exception_); ProFitData.gFRWKSVC.SysLog("frmCollectionLetter::cmdBESearchClick:Error", LogLevel.logAudit2); cmdBESearch.Enabled = true; Cerner.Foundations.Measurement.TimedMessageBox.Show(ResourceHandler.Resources.GetString("1482"), ResourceHandler.Resources.GetString("1475"), MessageBoxButtons.OK); //i18n } }
//get the data from the referenced searches internal int lGetSearchData(string rsFrom) { int result = 0; ProFitData.gFRWKSVC.SysLog("frmCollectionLetter::lGetSearchData", LogLevel.logAudit2); try { int lSeaStatus = 0; //status result from search PFTFramework.CMessage oMsg = null; //Message object if (string.Compare(rsFrom, "BESEARCH", true) == 0) { aBE_id = new double[3]; aBE_display = new string[] { String.Empty, String.Empty, String.Empty }; //Get the search data from account search lSeaStatus = oBESearch.lGetBEData(ref aBE_id, ref aBE_display, ref lCount); this.Cursor = Cursors.WaitCursor; if (lSeaStatus == ProFitData.PFT_SUCCESS) { if (lCount > 0) { mParent.Data.BillingEntityID = aBE_id[0]; txtBillingEntity.Text = aBE_display[0]; } } else { ProFitData.gFRWKSVC.SysLog("We got back a failure from lGetBEData", LogLevel.logDebug3); result = lSeaStatus; return(result); } //send a message to the AcctSearch to destroy itself oMsg = new PFTFramework.CMessage(); oMsg.MessageType = eMessageType.MSG_DESTROY; oBESearch.Message(ref oMsg); oBESearch = null; oMsg = null; cmdBESearch.Enabled = true; cmbDunningCd.Text = System.String.Empty; cmbDunningCd.Enabled = true; for (int n = 1; n <= 15; n++) { txtLetter[n].Text = System.String.Empty; } result = ProFitData.PFT_SUCCESS; ProFitData.gFRWKSVC.SysLog("frmCollectionLetter::lGetSearchData:Normal termination", LogLevel.logAudit2); return(result); } } catch (System.Exception _exception_) { Cerner.Foundations.Logging.ExceptionReporting.ReportException(_exception_); ProFitData.gFRWKSVC.SysLog("frmCollectionLetter::lGetSearchData:Error", LogLevel.logAudit2); } finally { this.Cursor = Cursors.Default; } return(result); }