public bool SaveEdit(AccountPartyModel acntModel)
        {
            bool status = true;
            AccountPartyRepository repo = new AccountPartyRepository();

            status = repo.SaveEdit(ParserAddAccount(acntModel));
            return(status);
        }
        private AccountParty ParserAddAccount(AccountPartyModel accountModel)
        {
            AccountParty accountEntity = new AccountParty();

            if (accountModel != null)
            {
                accountEntity.iAccountPartyID = accountModel.iAccountPartyID;
                accountEntity.strPartyName    = accountModel.strPartyName ?? "";
            }

            return(accountEntity);
        }
        public ActionResult SaveEdit(AccountPartyModel acntPartyModel)
        {
            bool status = true;

            try
            {
                if (ModelState.IsValid)
                {
                    AccountPartyServiceClient service = new AccountPartyServiceClient();
                    status = service.SaveEdit(acntPartyModel);
                }
            }
            catch (Exception e)
            {
                ModelState.AddModelError("error", "Something Went Wrong");
                status = false;
                throw e;
            }
            //return RedirectToAction("Index");
            //return View();
            return(new JsonResult {
                Data = new { status = status }
            });
        }