public UpdateResult Update(SupportInformation supportInformation) { UpdateResult result = new UpdateResult(); try { if (supportInformation.Id == 0) { _supportInformationRepository.Add(supportInformation); } else { _supportInformationRepository.Update(supportInformation); } } catch (Exception exception) { AddLogError(exception, "Error when update support information"); result.State = 4; result.KeyLanguage = UpdateResult.ERROR_WHEN_UPDATED; } if (result.State == 1) { Save(); } return(result); }
private static void ConfigureScope(Scope scope) { scope.User = new User { Id = SupportInformation.GetAnonymousIdentity(), Username = SupportInformation.GetSupportKey() }; }
public void GetSupportKey_Returns_NotNullOrWhitespace() => SupportInformation.GetSupportKey() .Should() .NotBeNullOrWhiteSpace();
public void GetAnonymousName_Returns_NotNullOrWhitespace() => SupportInformation.GetAnonymousIdentity() .Should() .NotBeNullOrWhiteSpace();
private void btnSupportKey_Click(object sender, EventArgs e) { Clipboard.SetText(SupportInformation.GetSupportKey()); }
public AnalyticsOptionsPageCustom() { InitializeComponent(); lblSupportKey.Text = $"Support Key: {SupportInformation.GetSupportKey()}"; }