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

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

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