public ActionResult AddClient(ClientModel client)
        {
            List<string> _errList = new List<string>();
            bool _success = false;

            if (ModelState.IsValid)
            {
                try
                {
                    new ClientsRepository().Add(Mapper.Map<Client>(client));
                    _success = true;
                }
                catch (DalException e)
                {
                    _errList.Add(e.Message);
                }
                catch (Exception)
                {
                    _errList.Add("DataBase Error");
                }
            }
            else
            {
                _errList = GetModelErrors();
            }

            return Json(new
            {
                success = _success,
                error = _errList
            });
        }
 public ActionResult AddClient()
 {
     ClientModel client = new ClientModel();
     return PartialView("AddClientView", client);
 }
 public ActionResult DeleteClientR(int id)
 {
     var client = new ClientModel() {Id=id};
     return PartialView("DeleteClientView", client);
 }