예제 #1
0
        public ActionResult CreateActivityLogType(ActivityLogTypeModel model )
        {
            if (ModelState.IsValid)
            {
                var activityType = new ActivityLogType()
                {
                    Name = model.Name.Trim(),
                    SystemKeyword = model.SystemKeyword.Trim()
                };

                activityService.InsertActivityType(activityType);
                return Json(new { IsValid = true });
            }

            //If we got this far, something failed, redisplay form
            return Json(new { IsValid = false, htmlData = RenderPartialViewToString("_CreateActivityLogType", model) });
        }
예제 #2
0
        public ActionResult CreateActivityLogType()
        {
            var model = new ActivityLogTypeModel();

            return PartialView("_CreateActivityLogType", model);
        }