Пример #1
0
        public ActionResult DeleteTemplate(int formId, int templateId)
        {
            using (var formManager = new FormManager(GetLoginUser()))
            {
                string result = formManager.DeleteTemplate(templateId);

                if (result.Equals("success"))
                {
                    TempData["success"] = "Template Deleted";
                    return(RedirectToRoute("form-viewtemplate", new { formId = formId }));
                }

                else
                {
                    TempData["error"] = result;
                    return(RedirectToRoute("form-viewtemplate", new { formId = formId }));
                }
            }
        }