public ActionResult Add()
        {
            var m = new TaskItemEditVM { /*[todo:set default value]*/
            };

            return(ForView("Edit", m));
        }
        public ActionResult Edit(int id)
        {
            var m = new TaskItemEditVM
            {
                Input = Map <TaskItem, TaskItemEditVM.EditInput>(TaskItemBD.Get(id))
            };

            return(ForView(m));
        }
 public ActionResult Save(TaskItemEditVM editvm)
 {
     if (ModelState.IsValid)
     {
         Save(editvm.Input);
         SetViewMessage(Message_SaveSuccessfully);
         if (editvm.Input.Id == 0)
         {
             return(RcJson());
         }
     }
     return(ClientShowMessage());
 }