Exemplo n.º 1
0
        public IActionResult edittrade(int id)
        {
            var model = new EditTradeModel();

            model.Load(id);
            return(View(model));
        }
Exemplo n.º 2
0
 public IActionResult edittrade([Bind(nameof(EditTradeModel.Id),
                                      nameof(EditTradeModel.trade_code))]
                                EditTradeModel model)
 {
     if (ModelState.IsValid)
     {
         model.Edit();
         return(RedirectToAction("index"));
     }
     return(View(model));
 }