示例#1
0
        public int AddAccountType(AccountType accountType)
        {
            accountType.Create();
            var ret = sAccount.Insert(accountType);

            return(ret);
        }
        public int AddOrUpdateType(AccountType account_type)
        {
            if (account_type == null)
            {
                throw new ArgumentNullException(nameof(account_type));
            }

            return(ExecuteFaultHandledOperation(() =>
            {
                var account_type_data = _acct_es.Map(account_type);
                return _repo_acct_type.Insert(account_type_data);
            }));
        }
示例#3
0
        public ActionResult Create(AccountType accountType)
        {
            if (ModelState.IsValid)
            {
                accountTypeRepository.Insert(accountType);
                TempData["Create"] = "Account type created!";

                return(RedirectToAction("Index"));
            }
            else
            {
                TempData["CreateFailed"] = "Creation failed";

                return(RedirectToAction("Create"));
            }
        }