Ejemplo n.º 1
0
        public int ModifyAccountType(AccountType accountType, string keyValue)
        {
            var entity = sAccount.FindEntity(keyValue);

            EntityCopyHelper.CopyEnity(entity, accountType);
            var ret = sAccount.Update(entity);

            return(ret);
        }
Ejemplo n.º 2
0
        public ActionResult Edit(AccountType accountType)
        {
            if (ModelState.IsValid)
            {
                accountTypeRepository.Update(accountType);

                TempData["Edited"] = "Account Type Edited.";

                return(RedirectToAction("Details", new { id = accountType.Id }));
            }
            else
            {
                TempData["EditFailed"] = "Error occurs.";

                return(View(accountType));
            }
        }