예제 #1
0
        public ActionResult Create(PtNewItemVm vm)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    var newItem = vm.ToPtNewItem();
                    newItem.UserId = CURRENT_USER_ID;

                    rpsItemsRepo.AddNewItem(newItem);

                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(View(vm));
                }
            }
            catch
            {
                return(View(vm));
            }
        }
예제 #2
0
        // GET: Backlog/Create
        public ActionResult Create()
        {
            var vm = new PtNewItemVm();

            return(View(vm));
        }