コード例 #1
0
        public IActionResult Edit(EditClientViewModel editClient)
        {
            bool result = clientServices.EditClient(editClient);

            if (!result)
            {
                return(View(editClient));
            }
            else
            {
                return(Redirect("/Client/All/"));
            }
        }
コード例 #2
0
        public ActionResult Edit(int id, ClientDetailsViewModel clientViewModel)
        {
            try
            {
                var client = _mapper.Map <ClientDTO>(clientViewModel);
                _clientServices.EditClient(client);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }
コード例 #3
0
 public IActionResult EditClient([FromBody] Client client)
 {
     _clientServices.EditClient(client);
     return(Ok());
 }