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