public AlertMessageCollection FetchAll() { AlertMessageCollection coll = new AlertMessageCollection(); Query qry = new Query(AlertMessage.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
public async Task <IActionResult> logout(string returnUrl = null) { await _signInManager.SignOutAsync(); _logger.LogInformation("User logged out."); AlertMessageCollection.AddSuccessAlert($"You have successfully signed out of {WebSiteOptions.WebSiteTitle}."); return(RedirectToLocal(returnUrl)); }
public async Task <IActionResult> testemail(TestEmailModel model) { if (ModelState.IsValid) { var result = await _emailService.SendEmailAsync(new EmailMessage { EmailAddress = model.Email, Subject = $"Test message from {WebSiteOptions.WebSiteTitle}", Body = $"This is a test message from {WebSiteOptions.WebSiteTitle}.{Environment.NewLine}{Environment.NewLine}{model.Message}" }); if (result.Success) { AlertMessageCollection.AddSuccessAlert($"Email sent to {model.Email}\n{result.Details}", "Email Sent!"); } else { AlertMessageCollection.AddDangerAlert(result.Details, "Email Failure"); } } return(View()); }
public void Setup() { _backingCollection = new Dictionary <string, object>(); _alertMessageCollection = new AlertMessageCollection(_backingCollection); }
public AlertMessageCollection FetchByQuery(Query qry) { AlertMessageCollection coll = new AlertMessageCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
public AlertMessageCollection FetchByID(object AlertID) { AlertMessageCollection coll = new AlertMessageCollection().Where("alertID", AlertID).Load(); return coll; }