public JsonResult GetUserEmailAlerts(DataTableParams dtp) { if (User.Identity.IsAuthenticated) { string userName = User.Identity.Name; BusinessLibrary.Library.ManageEmailAlertLibrary mLib = new BusinessLibrary.Library.ManageEmailAlertLibrary(); return(Json(mLib.GetUserEmailAlerts(userName, dtp).ListDataTable)); } return(Json(new DataTableObject <string>())); }
public JsonResult DeleteAlert(BusinessLibrary.UIRequestClasses.TrackerUpdateRequest alertRequest) { try { BusinessLibrary.Library.ManageEmailAlertLibrary mLib = new BusinessLibrary.Library.ManageEmailAlertLibrary(); mLib.DeleteEmailAlert(alertRequest.entryID); return(Json(new { StatusKey = "SUCCESS" })); } catch { return(Json(new { StatusKey = "ERROR" })); } }
public JsonResult DeleteAllAlerts() { try { if (User.Identity.IsAuthenticated) { string userName = User.Identity.Name; BusinessLibrary.Library.ManageEmailAlertLibrary mLib = new BusinessLibrary.Library.ManageEmailAlertLibrary(); mLib.DeleteAllUserAlerts(userName); return(Json(new { StatusKey = "SUCCESS" })); } return(Json(new { StatusKey = "ERROR" })); } catch { return(Json(new { StatusKey = "ERROR" })); } }