Beispiel #1
0
        public ActionResult Create(RssFeedManageModel model, SubmitType submit)
        {
            if (ModelState.IsValid)
            {
                var response = _rssFeedService.SaveRssFeed(model);
                SetResponseMessage(response);
                if (response.Success)
                {
                    var id = (int)response.Data;
                    switch (submit)
                    {
                    case SubmitType.Save:
                        return(RedirectToAction("Index"));

                    default:
                        return(RedirectToAction("Edit", new { id }));
                    }
                }
            }
            return(View(model));
        }