///<summary>Attempts to submit an exception to HQ. ///Checks PrefName.SendUnhandledExceptionsToHQ prior to web call.</summary> public static BugSubmissionResult SubmitException(Exception ex, out string displayMsg, string threadName = "", long patNumCur = -1, string moduleName = "") { //No remoting role check; no call to db displayMsg = null; if (MockBugSubmissions != null) { return(MockBugSubmissions.SubmitException(ex, threadName, patNumCur, moduleName)); } //Default SendUnhandledExceptionsToHQ to true if the preference cache is null or the preference was not found. //There might not be a database connection yet, therefore the preference cache could be null. //HQ needs to know more information regarding unhandled exceptions prior to setting a database connection (.NET issue, release issue, etc). if (!PrefC.GetBoolSilent(PrefName.SendUnhandledExceptionsToHQ, true)) { return(BugSubmissionResult.None); } BugSubmission bugSubmission = new BugSubmission(ex, threadName, patNumCur, moduleName); string registrationKey = null; string practiceTitle = null; string practicePhone = null; string programVersion = null; string webServiceHqURL = ""; if (bugSubmission.RegKey == "7E57-1NPR-0DUC-710N") { registrationKey = bugSubmission.RegKey; practiceTitle = "Unknown"; practicePhone = "Unknown"; programVersion = bugSubmission.Info.OpenDentBusinessVersion; webServiceHqURL = "https://www.patientviewer.com:49997/OpenDentalWebServiceHQ/WebServiceMainHQ.asmx"; } return(ParseBugSubmissionResult( WebServiceMainHQProxy.GetWebServiceMainHQInstance(webServiceHqURL).SubmitUnhandledException( PayloadHelper.CreatePayload( PayloadHelper.CreatePayloadContent(bugSubmission, "bugSubmission"), eServiceCode.BugSubmission, registrationKey, practiceTitle, practicePhone, programVersion ) ) , out displayMsg )); }