Example #1
0
        public ActionResult CreateTermSubmit(string code, string startDate, string endDate)
        {
            if (!loggedIn())
            {
                return(RedirectToAction("Index", "Login", new { redirectAction = "Index", redirectController = "Admin" }));
            }
            if (!checkPermission())
            {
                return(RedirectToAction("AccessDenied", "Home"));
            }
            DateTime start = DateTime.ParseExact(startDate, "yyyy/MM/dd", CultureInfo.InvariantCulture);
            DateTime end   = DateTime.ParseExact(endDate, "yyyy/MM/dd", CultureInfo.InvariantCulture);
            Term     term  = new Term(0, code, start, end);

            proxy.createTerm(term);
            return(RedirectToAction("FormResponse", "Admin", new { message = "Term Creation Success" }));
        }