示例#1
0
        public ActionResult Basic(int id)
        {
            Node node = NodeService.GetNode(id);

            if (node == null)
            {
                return(new HttpNotFoundResult("Node not found"));
            }
            NodeVM vm = NodeVM.FromModel(node);

            return(new JsonNetResult(vm));
        }
示例#2
0
 public ActionResult Edit(int?id)
 {
     if (id.HasValue)
     {
         Node node = NodeService.GetNode(id.Value);
         if (node == null)
         {
             return(new HttpNotFoundResult("Node not found"));
         }
         NodeVM vm = NodeVM.FromModel(node).Fill();
         return(View(vm));
     }
     return(View(NodeVM.FromModel().Fill()));
 }