// GET: Client/Edit/5 public ActionResult Edit(int id) { try { Domain.Client.Client client = _clientService.GetClientById(id); ClientViewModel model = Mapper.Map <ClientViewModel>(client); return(View(model)); } catch { return(View()); } }
public ActionResult Edit(int id, ClientViewModel model) { try { Domain.Client.Client client = _clientService.GetClientById(id); client = Mapper.Map <Client>(model); _clientService.EditClient(id, client); return(RedirectToAction("Index")); } catch (Exception ex) { return(RedirectToAction("Index")); } }
public void SaveClient(Domain.Client.Client client) { _clientRepository.SaveClient(client); }
public void EditClient(int id, Domain.Client.Client client) { _clientRepository.EditClient(id, client); }