public ActionResult Add(GoodsSpecificationModel model) { if (ModelState.IsValid) { GoodsSpecification GoodsSpecification = model.MapTo <GoodsSpecificationModel, GoodsSpecification>(); _goodsSpecificationService.Insert(GoodsSpecification); return(RedirectToAction("Index")); } return(View(model)); }
public ActionResult Edit(GoodsSpecificationModel model) { if (ModelState.IsValid) { GoodsSpecification goodsSpecification = model.MapTo <GoodsSpecificationModel, GoodsSpecification>(); _goodsSpecificationService.Update(goodsSpecification); SuccessNotification($"{_localizationService.GetResource("UpdateSuccess") }"); return(RedirectToAction("Index")); } return(View(model)); }
public ActionResult Add() { GoodsSpecificationModel model = new GoodsSpecificationModel(); return(View(model)); }