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"); } }