예제 #1
0
        ///<summary>Expire confirmations for any appointments that have been rescheduled since sending out a confirmation request.</summary>
        public static void HandleConfirmationsApptChanged()
        {
            //No remoting role check needed.
            List <ConfirmationRequest> listChanged = GetForApptChanged();
            List <string> listShortGuids           = listChanged.Where(x => !string.IsNullOrWhiteSpace(x.ShortGUID)).Select(x => x.ShortGUID).ToList();

            listShortGuids.AddRange(listChanged.Where(x => !string.IsNullOrWhiteSpace(x.ShortGuidEmail)).Select(x => x.ShortGuidEmail));
            if (listShortGuids.Count == 0)
            {
                return;
            }
            string hqPayload = WebServiceMainHQProxy.CreateWebServiceHQPayload(WebServiceMainHQProxy.CreatePayloadContent(listShortGuids, "ListShortGuids"),
                                                                               eServiceCode.ConfirmationRequest);
            string      result = WebServiceMainHQProxy.GetWebServiceMainHQInstance().HandleConfirmationsApptChanged(hqPayload);
            XmlDocument doc    = new XmlDocument();

            doc.LoadXml(result);
            XmlNode node = doc.SelectSingleNode("//Error");

            if (node != null)
            {
                throw new Exception(node.InnerText);
            }
            //Deleting these will cause the AutoComm thread to resend where necessary.
            DeleteShortGuids(listShortGuids);
        }
예제 #2
0
        ///<summary>Gets the specified number of short GUIDs</summary>
        ///<returns>First item in the Tuple is the short GUID. Second item is the URL for the short GUID if there is one for this eService.</returns>
        public static List <ShortGuidResult> GetShortGUIDs(int numberToGet, long clinicNum, eServiceCode eService)
        {
            List <PayloadItem> listPayloadItems = new List <PayloadItem> {
                new PayloadItem(clinicNum, "ClinicNum"),
                new PayloadItem(numberToGet, "NumberShortGUIDsToGet")
            };
            string officeData = WebServiceMainHQProxy.CreateWebServiceHQPayload(WebServiceMainHQProxy.CreatePayloadContent(listPayloadItems), eService);
            string result     = WebServiceMainHQProxy.GetWebServiceMainHQInstance().GenerateShortGUIDs(officeData);

            return(WebServiceMainHQProxy.DeserializeOutput <List <ShortGuidResult> >(result, "ListShortGuidResults"));
        }
예제 #3
0
 ///<summary>Attempts to submit an exception to HQ.
 ///Checks PrefName.SendUnhandledExceptionsToHQ prior to web call.
 ///Returns BugSubmissionResult.UpdateRequired when submitter is not on most recent stable or any version of the beta.
 ///Returns BugSubmissionResult.Failed when an error occured in the web call method.
 ///Returns BugSubmissionResult.Success when bugSubmissions was successfully created at HQ.</summary>
 public static BugSubmissionResult SubmitException(Exception ex, string threadName = "", long patNumCur = -1, string moduleName = "")
 {
     if (!PrefC.GetBool(PrefName.SendUnhandledExceptionsToHQ) ||
         _listInvalidExceptionText.Any(x => ex.Message.ToLower().Contains(x.ToLower())))
     {
         return(BugSubmissionResult.None);
     }
     return(BugSubmissions.ParseBugSubmissionResult(
                WebServiceMainHQProxy.GetWebServiceMainHQInstance().SubmitUnhandledException(
                    WebServiceMainHQProxy.CreateWebServiceHQPayload(
                        WebServiceMainHQProxy.CreatePayloadContent(
                            new BugSubmission(ex, threadName, patNumCur, moduleName), "bugSubmission")
                        , eServiceCode.BugSubmission))));
 }