Пример #1
0
 public ActionResult Add(GoodsUnitModel model)
 {
     if (ModelState.IsValid)
     {
         GoodsUnit goodsUnit = model.MapTo <GoodsUnitModel, GoodsUnit>();
         _goodsUnitService.Insert(goodsUnit);
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }
Пример #2
0
 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));
 }
Пример #3
0
        public ActionResult Add()
        {
            GoodsUnitModel model = new GoodsUnitModel();

            return(View(model));
        }