Example #1
0
        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>()));
        }
Example #2
0
 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" }));
     }
 }
Example #3
0
 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" }));
     }
 }