示例#1
0
 public ActionResult Index()
 {
     ShapeViewModel shapeViewModel = new ShapeViewModel()
     {
         Shape = Last()
     };
     return View(shapeViewModel);
 }
示例#2
0
 public ActionResult Save(ShapeViewModel viewModel)
 {
     ShapeModel shape = viewModel.Shape;
     if (ModelState.IsValid)
     {
         ShapeModel newShape = new ShapeModel { ShapeTypeId = shape.ShapeTypeId, Height = shape.Height, Label = shape.Label, LabelRow = shape.LabelRow };
         Save(shape);
     }
     return View("Index", viewModel);
 }