Ejemplo n.º 1
0
        public ActionResult EditBataRate(int id)
        {
            BataRateViewModel model = new BataRateViewModel();
            BataRate          bata  = _bataRateService.GetBataRateById(id);

            model = Mapper.Map <BataRateViewModel>(bata);
            return(View(model));
        }
Ejemplo n.º 2
0
 public ActionResult EditBataRate(int id, BataRate models)
 {
     try
     {
         BataRateViewModel model = new BataRateViewModel();
         BataRate          bata  = _bataRateService.GetBataRateById(id);
         bata.Description = models.Description;
         bata.Amount      = models.Amount;
         _bataRateService.SaveBataRates(bata);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }