///<summary>Uploads Preferences to the Patient Portal /Mobile Web.</summary> public static void UploadPreference(PrefName prefname) { try { if (TestWebServiceExists()) { Prefm prefm = Prefms.GetPrefm(prefname.ToString()); mb.SetPreference(PrefC.GetString(PrefName.RegistrationKey), prefm); } } catch (Exception ex) { MessageBox.Show(ex.Message); //may not show if called from a thread but that does not matter - the failing of this method should not stop the the code from proceeding. } }
///<summary>Uploads Preferences to the Patient Portal /Mobile Web.</summary> public static void UploadPreference(PrefName prefname) { if (PrefC.GetString(PrefName.RegistrationKey) == "") { return; //Prevents a bug when using the trial version with no registration key. Practice edit, OK, was giving error. } try { if (TestWebServiceExists()) { Prefm prefm = Prefms.GetPrefm(prefname.ToString()); mb.SetPreference(PrefC.GetString(PrefName.RegistrationKey), prefm); } } catch (Exception ex) { MessageBox.Show(ex.Message); //may not show if called from a thread but that does not matter - the failing of this method should not stop the the code from proceeding. } }
public void SetPreference(String RegistrationKey, Prefm prefm) { try { Logger.Information("In SetPreference"); customerNum = util.GetDentalOfficeID(RegistrationKey); if (customerNum == 0) { return; } else { prefm.CustomerNum = customerNum; Prefms.UpdatePreference(prefm); } } catch (Exception ex) { Logger.LogError("IpAddress=" + HttpContext.Current.Request.UserHostAddress + " DentalOfficeID=" + customerNum, ex); throw new Exception("Exception in SetPreference"); } }