Example #1
0
        public ActionResult _EditStepperAlternateAddress(AlternateAddressVM mAlternateAddressVm)
        {
            var acc = TempAccount;

            if (TryUpdateModel(acc))
            {
                return(ReturnJsonFormSuccess());
            }
            return(PartialView("../Account/_EditAlternateAddress", mAlternateAddressVm));
        }
        public ActionResult _EditAlternateAddress(AlternateAddressVM mAlternateAddressVM)
        {
            var acc = _accountService.GetAccount(mAlternateAddressVM.CustomerAccountId);

            if (TryUpdateModel(acc))
            {
                if (ExecuteRepositoryAction(() =>
                {
                    _accountService.UpdateAccount(acc);
                    _accountService.CommitChanges();
                }))
                {
                    return(ReturnJsonFormSuccess());
                }
            }
            return(PartialView(mAlternateAddressVM));
        }