Example #1
0
        public ActionResult DeleteSpamItems(DeleteSpamViewModel model)
        {
            var snipKeys = Request.Form.AllKeys.Where(ky => ky.StartsWith("snippet_")).ToArray();

            for (int index = 0; index < snipKeys.Length; index++)
            {
                snipKeys[index] = snipKeys[index].Replace("snippet_", "");
            }

            var adminBus = new busAdministration();

            if (!adminBus.DeleteSnippets(snipKeys))
            {
                ErrorDisplay.ShowError(adminBus.ErrorMessage);
            }
            else
            {
                ErrorDisplay.ShowMessage(snipKeys.Length + " snippets deleted.");
            }

            var busAdmin = new busAdministration();

            model.Snippets = busAdmin.GetSpamKeywords(model.SearchTerm);

            return(View("DeleteSpam", model));
        }
Example #2
0
        public ActionResult DeleteSpam(DeleteSpamViewModel model)
        {
            if (!string.IsNullOrEmpty(Request.Form["btnDelete"]))
            {
                return(DeleteSpamItems(model));
            }

            var busAdmin = new busAdministration();

            model.Snippets = busAdmin.GetSpamKeywords(model.SearchTerm);


            return(View(model));
        }
Example #3
0
        public ActionResult DeleteSpam()
        {
            var model = new DeleteSpamViewModel();

            return(View(model));
        }
Example #4
0
        public ActionResult DeleteSpamItems(DeleteSpamViewModel model)
        {
            var snipKeys = Request.Form.AllKeys.Where(ky => ky.StartsWith("snippet_")).ToArray();

            for (int index = 0; index < snipKeys.Length; index++)
            {                
                snipKeys[index] =snipKeys[index].Replace("snippet_", "");
            }

            var adminBus = new busAdministration();

            if (!adminBus.DeleteSnippets(snipKeys))
                this.ErrorDisplay.ShowError(adminBus.ErrorMessage);
            else
                this.ErrorDisplay.ShowMessage(snipKeys.Length + " snippets deleted.");

            var busAdmin = new busAdministration();
            model.Snippets = busAdmin.GetSpamKeywords(model.SearchTerm);

            return this.View("DeleteSpam",model);
        }
Example #5
0
        public ActionResult DeleteSpam(DeleteSpamViewModel model)
        {
            if (!string.IsNullOrEmpty(Request.Form["btnDelete"]))
                return DeleteSpamItems(model);

            var busAdmin = new busAdministration();
            model.Snippets = busAdmin.GetSpamKeywords(model.SearchTerm);


            return View(model);
        }
Example #6
0
 public ActionResult DeleteSpam()
 {
     var model = new DeleteSpamViewModel();
     return View(model);
 }